Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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 format.
I DO NOT want a table with two values. I want to display a card with these two values separated by a comma. (and so on and so forth if there are 3 days with the same sale amount), something like this:
Is this possible in Power BI at all?
Thanks!
Solved! Go to Solution.
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
Proud to be a Super User!
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
Proud to be a Super User!
@DataInsights
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.
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. 🙂
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
49 | |
38 | |
38 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |