Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello community! 🖐
I hope there is someone out there who can help me with this issue.
I am building a dashboard where companies are scored by several criteria. this score is a measure and not a column in my data table. I want a card that shows the number 1 performing company, based on the highest score. there was an answer to a similar question with the solution:
Calculate(rankx(ALL('Table'[Supplier]),[Total Sales Volume]))
the problem with this formula is that it uses 2 columns, but I have the column (company) and a measure (PAM score). this formula does not work for me. next I tried this formula, and made a card out of it:
top performer = CALCULATE(RANKX(ALL(PAM2[company]), PAM2[PAM Score]))
Solved! Go to Solution.
Hi @Anonymous ,
I have built a data sample:
So based on your desciption, you want to display Company B in Card visual ,right?
Please try:
Top1 Company =
var _t=ADDCOLUMNS(VALUES(PAM2[Company]),"Rank",CALCULATE(RANKX(ALL(PAM2[company]), PAM2[PAM Score])))
return CALCULATE(MAX('PAM2'[Company]) ,FILTER(_t,[Rank]=1))
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
I have built a data sample:
So based on your desciption, you want to display Company B in Card visual ,right?
Please try:
Top1 Company =
var _t=ADDCOLUMNS(VALUES(PAM2[Company]),"Rank",CALCULATE(RANKX(ALL(PAM2[company]), PAM2[PAM Score])))
return CALCULATE(MAX('PAM2'[Company]) ,FILTER(_t,[Rank]=1))
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
If I got your point correctly, try this:
top performer =
Var _A = filter(ADDCOLUMNS(PAM2,"Rank",RANKX(ALL(PAM2[company]), PAM2[PAM Score])),[Rank]=1)
return
MAXX(_A,[company])
it it does not work:
Can you post sample data as text and expected output?
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tables
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
hello,
many thanks for your reply,
it did however not return the right solution, the other explanation did work fortunatly.
thanks anyways for your time and effort 🙂
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.