Forum Discussion
Rishabh-Maini
Helper II
5 years agoTop N values including Ties
Hi, I have the following table: I want to display the days with maximum sale, including all days if it is a tie. In the above example, I wish to display "Mon, Thur" in this for...
- 5 years ago
Try this measure:
Highest Sale = VAR vTable = ADDCOLUMNS ( VALUES ( Table1[Day] ), "@Rank", RANKX ( ALL ( Table1[Day] ), CALCULATE ( SUM ( Table1[Sale] ) ),, DESC, DENSE ) ) VAR vTopValues = FILTER ( vTable, [@Rank] = 1 ) VAR vResult = CONCATENATEX ( vTopValues, Table1[Day], ", " ) RETURN vResult
Rishabh-Maini
Helper II
5 years agoDataInsights
You, are a blessing.
Thank you so much!
While here, could you suggest any websites/sources where I can learn/practice/explore DAX measures (instead of only working on them when a requirement rolls in)? Would really appreciate it.
DataInsights
Super User
5 years ago
Check out these sites:
https://www.sqlbi.com (check out their book "The Definitive Guide to DAX")
DAX is a tricky language that requires a conceptual understanding. Invest the time necessary to learn concepts, and measures will flow more easily. 🙂
- Rishabh-Maini5 years ago
Helper II
DataInsights Thanks once again!