Purpose of the All function
Hi everyone,
When I was going over the solution for Task 4 part 3 in the Power BI module, I came across the following DAX:
Total_Sales_Percentage = DIVIDE([TotalSalesAmount],
CALCULATE(SUM(fact_InternetSales[SalesAmount],
ALL(dim_SalesTeritory[SalesTerritoryCountry]),
ALL(dim_SalesTeritory[Country_Column])))*100 I know the DAX calculates the total percentage of sales by country but I don't understand why two ALL functions are needed to make the function work. I didn't quite understand the video's explanation for why this is so an alternative explanation will be really helpful.
CALCULATE(SUM(fact_InternetSales[SalesAmount],
ALL(dim_SalesTeritory[SalesTerritoryCountry]),
ALL(dim_SalesTeritory[Country_Column])))*100 I know the DAX calculates the total percentage of sales by country but I don't understand why two ALL functions are needed to make the function work. I didn't quite understand the video's explanation for why this is so an alternative explanation will be really helpful.
0 answers ( 0 marked as helpful)