Last answered:

10 Mar 2023

Posted on:

09 Mar 2023

0

Resolved: Doubt on DAX formula

Why can't we use directly,

 %SalesUnitedStates = DIVIDE([SalesAmountUnitedStates], [TotalSalesAmount], ALL(dim_SalesTeritory[SalesTerritoryCountry]))*100

As we already have calculated the [TotalSalesAmount].

But I am getting ths error as shown in Attched file.

 

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

10 Mar 2023

0

Because the syntax is incorrect, the DIVIDE function is a asking for a nominator, denominator  and an alternative result which is optional. The SalesTerritoryCountry is a text field therefore it cannot be an alternative result. We are including it inside the CALCULATE function, so that we are dividing the sales of the United States against the Total Sales Amount for ALL countries. Please use the code shown inside the video.

Posted on:

10 Mar 2023

1

Thank you so much! 

Submit an answer