Forum Discussion
Calculated Measure with conditions
- Anonymous9 years ago
jaymanivannan response is great. To add to this, rather than using the / symbol and have to make a divide by zero check, just use the Divide() function. I've also set this out using a spacing format, which is a good habit to get yourself into.
Here is an updateSalesAverage = DIVIDE( CALCULATE( SUM(Total Sales $), [AccountCode]=410000 ), CALCULATE ( Sum(Total Sales Quantity), [AccountCode]=420000 ) )
ericOnline I believe you would need to use https://docs.microsoft.com/en-us/dax/username-function-dax and then find some way of relating that information to your account information. If the email address is shared, then you might have some luck.
Thanks for the reply Anonymous , but I'm not sure how that function would help. I'm attempting to grab a column from a Table vis that the user has selected. Then use that column as a variable for a measure.
- Anonymous6 years agoNot applicable
Ok i definately misunderstood. I dont believe there is a dax can interact with visual selections so directly. You might need to use indirect methods such as HASONEFILTER.