Forum Discussion
Burak83_
3 years agoRegular Visitor
Count based on multiple criteria DAX
Hi Gents, I would like to count distinct values based on the combination of multiple columns.(In sample Location+Item+Status) I added my table as data model to count distinct values but it does not ...
Burak83_
3 years agoRegular Visitor
Hi Edhans,
Thanks for the solution. However, since I am using powerpivot it does not support selectedvalue. Is there any other equivalent formula that I can use? like IF(HASONEVALUE(<columnName>), VALUES(<columnName>), <alternateResult>)
edhans
Community Champion
3 years agoYes. Just use this instead of SELECTEDVALUE() in PowerPivot. It gives the same results.
IF ( HASONEVALUE( <columnName> ), VALUES( <columnName> ), <alternateResult> )
The first one would be:
IF ( HASONEVALUE( Table[Item] ), VALUES( Table[Item] ) )
Note that SELECTEDVALUE is coming to PowerPivot. See New DAX Functions in Excel Data Models and Power Pivot (office.com)