Forum Discussion
raj777karthik
3 years agoMicrosoft Employee
TOPN 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...
- 3 years ago
raj777karthik
3 years agoMicrosoft Employee
Measure 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
3 years agoCommunity Support
- raj777karthik3 years agoMicrosoft Employee
Thanks Yadong.Its working fine.