Forum Discussion
raj777karthik
Microsoft Employee
4 years agoTOPN dax function as variable
Need to show top 5 services in table visual. Service Name Count Total Count Apple 43 346 Samsumg 67 346 mi 80 346 oppo 84 346 google 72 346 Measure written we...
- 4 years ago
raj777karthik
Microsoft Employee
4 years agoMeasure written:
Count = COUNT('Stack Tags'[Service])
Rank = IF(HASONEVALUE('Stack Tags'[Service]),
RANKX(ALL('Stack Tags'[Service]),[Count],,DESC,Dense)
)
Total count = CALCULATE([Count],FILTER(ALL('Stack Tags'),'Stack Tags'[Rank]<=5))
v-yadongf-msft
Community Support
4 years ago- raj777karthik4 years ago
Microsoft Employee
Thanks Yadong.Its working fine.