let
    Source = Table.Combine({#"2023", #"2022", #"2021"}),
    #"Renamed Columns" = Table.RenameColumns(Source,{{"%", "Domestic Earnings (%)"}, {"%_1", "Foreign Earnings (%)"}}),
    #"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Foreign Earnings (%)", Percentage.Type}, {"Domestic Earnings (%)", Percentage.Type}, {"Foreign", type text}}),
    #"Replaced Value" = Table.ReplaceValue(#"Changed Type","$","",Replacer.ReplaceText,{"Foreign"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Replaced Value",{{"Foreign", type number}}),
    #"Renamed Columns1" = Table.RenameColumns(#"Changed Type1",{{"Foreign", "Foreign ($)"}}),
    #"Replaced Value1" = Table.ReplaceValue(#"Renamed Columns1","$","",Replacer.ReplaceText,{"Domestic"}),
    #"Changed Type2" = Table.TransformColumnTypes(#"Replaced Value1",{{"Domestic", type number}}),
    #"Renamed Columns2" = Table.RenameColumns(#"Changed Type2",{{"Domestic", "Domestic ($)"}}),
    #"Replaced Value2" = Table.ReplaceValue(#"Renamed Columns2","$","",Replacer.ReplaceText,{"Worldwide"}),
    #"Renamed Columns3" = Table.RenameColumns(#"Replaced Value2",{{"Worldwide", "Worldwide($)"}}),
    #"Changed Type3" = Table.TransformColumnTypes(#"Renamed Columns3",{{"Worldwide($)", type number}}),
    #"Replaced Errors" = Table.ReplaceErrorValues(#"Changed Type3", {{"Domestic ($)", 0}}),
    #"Replaced Errors1" = Table.ReplaceErrorValues(#"Replaced Errors", {{"Domestic Earnings (%)", 0}}),
    #"Replaced Errors2" = Table.ReplaceErrorValues(#"Replaced Errors1", {{"Foreign ($)", 0}}),
    #"Renamed Columns4" = Table.RenameColumns(#"Replaced Errors2",{{"Release Group", "Movie Name"}}),
    #"Sorted Rows" = Table.Sort(#"Renamed Columns4",{{"Rank", Order.Ascending}}),
    #"Changed Type4" = Table.TransformColumnTypes(#"Sorted Rows",{{"Year", Int64.Type}}),
    #"Replaced Errors3" = Table.ReplaceErrorValues(#"Changed Type4", {{"Foreign ($)", 0}}),
    #"Replaced Errors4" = Table.ReplaceErrorValues(#"Replaced Errors3", {{"Foreign Earnings (%)", 0}}),
    #"Replaced Errors5" = Table.ReplaceErrorValues(#"Replaced Errors4", {{"Domestic Earnings (%)", 0}}),
    #"Replaced Errors6" = Table.ReplaceErrorValues(#"Replaced Errors5", {{"Domestic ($)", 0}})
in
    #"Replaced Errors6"