Forum Discussion
Anonymous
3 years agoNot applicable
DAX Divide in a Measure with Variables
Hello. I would like some help with regards to the following %NS measure. %NS measure is a division of Accounts Value per Netsales. I want to create the first table and instead I am getting the secon...
amitchandak
3 years agoSuper User
Anonymous , try like
%NS PER =
VAR Netsales= CALCULATE (
SUMX(Table;Table[Value]);
FILTER(all(Table[Account]) ;Table[Account]="Net Sales"))
Var GMI= CALCULATE (
SUMX(Table;Table[Value]);
FILTER(all(Table[Account]);Table[Account]="GMI"))
RETURN
DIVIDE(GMI;Netsales;0)
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.