Forum Discussion
arp
7 years agoRegular Visitor
Using distinct count in a measure
Hi all, I'm relatively new to the world of Power BI so apologies if this is relatively obvious to some of you... I have a list of ID numbers that are duplicated within a multi-year dataset. I...
- 7 years ago
arpCould you please post the error message that you are getting. Here is the same in "Multi-row card" visual as well
PattemManohar
7 years agoCommunity Champion
arp Please try below two as "New Measure"
Test101Count = DISTINCTCOUNT(Test101Measure[IDNumber])
Test101Variance = VAR _CurrYear = DISTINCTCOUNT(Test101Measure[IDNumber]) VAR _PrevYear = CALCULATE(DISTINCTCOUNT(Test101Measure[IDNumber]),FILTER(ALL(Test101Measure),Test101Measure[Year]=SELECTEDVALUE(Test101Measure[Year])-1) ) VAR _Var = ((_CurrYear-_PrevYear)/_CurrYear)*100 RETURN _Var