March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Here is the text to get the top spender, how to get the second highest spender?
Hi @StephenF ,
You could create a measure like
top 2 =
CONCATENATEX (
FILTER (
ALLSELECTED ( 'Table'[ID]),
RANKX (
ALLSELECTED ( 'Table'[ID]),
CALCULATE ( SUM('Table'[Sales]) ),
,
DESC
) <= 2
),
'Table'[ID],
", ",
RANKX (
ALLSELECTED ( 'Table'[ID] ),
CALCULATE ( SUM('Table'[Sales]) ),
,
DESC
)
)
Then you'll get the dynamic top 2.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Now, how to get the second highest sale only..
Last top 2?
@StephenF , I tried a few combinations like 2nd highest, rank 2, Seem like you need to train it to use rank for such a case
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
86 | |
76 | |
57 | |
52 |
User | Count |
---|---|
201 | |
137 | |
108 | |
73 | |
68 |