Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Trying to make a (I thought) simple TopN measure like :
Anybody that can help me out and tell me whats wrong and how to fix?
I want the Top 5 on field PF name (it will not let me choose that field only the table Backorder details) based on BO Qty.
Solved! Go to Solution.
Sorry, i was just looking at the function and forgot to calculate the measure.
This works
Top5_BO_Qty =
CALCULATE(
[BO Qty],
KEEPFILTERS(
TOPN(
5,
ALL('Backorder Details'[PF Name]),
[BO Qty],
DESC
)
)
)
Kind regards,
José
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂
Hi
Do this
Top5_BO_Qty =
TOPN(5,
ALL('Backorder Details'[yourfield]),
[BO Qty],
DESC)
Kind regards,
José
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂
Thanks @jcalheir
Did this :
It is a card, so just to check the one value measure.
Is it possible to share your PBIX file so we can take a look?
Ok had to throw out a lot because it work data, but still the field from the measure are there and also the error.
So hopefully this example is enough to solve it.
I cannot add a file here so I put it on drive:
https://drive.google.com/file/d/1wGjxsuFgUAG-q1CgvvEMfSy4zGzjy-Nc/view?usp=drivesdk
Sorry, i was just looking at the function and forgot to calculate the measure.
This works
Top5_BO_Qty =
CALCULATE(
[BO Qty],
KEEPFILTERS(
TOPN(
5,
ALL('Backorder Details'[PF Name]),
[BO Qty],
DESC
)
)
)
Kind regards,
José
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
70 | |
67 | |
51 | |
39 | |
26 |
User | Count |
---|---|
87 | |
55 | |
45 | |
42 | |
36 |