Last answered:

10 Jan 2023

Posted on:

08 Jan 2023

0

Resolved: % total sales amount measure

I couldn't really understand why we used ALL function with the dim_SalesTerritory[CountryOrder] country order in the calculation of the dominator for the percentage of total sales amount measure, could you please explain it further

3 answers ( 2 marked as helpful)
Instructor
Posted on:

08 Jan 2023

0

The ALL function in this case says please find out the percentage of sales for each country. If we don't use the all function, we are going to get 100% for each country which will be incorrect. All means that for each row Power BI will divide the sales amount for the country against the sales amount for all countries.

Posted on:

09 Jan 2023

0

%TotalSalesAmount = DIVIDE[TotalSalesAmount] ,
CALCULATE(SUM(fact_InternetSales[SalesAmount]),
ALL(dim_SalesTeritory[SalesTerritoryCountry]),
ALL(dim_SalesTeritory[CountryOrder])))*100

i meant , why you used country order column and didn't only use SalesTerritoryCountry ?

Instructor
Posted on:

10 Jan 2023

1

During the time of the recording we were having issues with the results for each country when we ordered the sorting to be based off Country Order. Having the ALL function applied on CountryOrder is no longer necessary, instead a better practice would be to say ALL(dim_SalesTeritory) so that the ALL operator will be applied on the entire country table.

Submit an answer