Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi
I have the following Measure created.
Solved! Go to Solution.
@330SMG this is the measure for top 5 first names:
Top5 First Names =
CALCULATE(
[Total Orders],
FILTER(
VALUES(DimCustomer[FirstName]),
IF(RANKX(ALL(DimCustomer[FirstName]),[Total Orders],,DESC)<=5,[Total Orders],BLANK())
)
)
After you created the measure you need to make sure to put the right column in the visual (In this case. [FirstName], in the previous case [CustomerKey]). That is why in both cases I get the right result with the same data you have.
@330SMG I tested your measure on my sample data and it's working:
Also created a 2nd version, so you can try it, but if the 1st one didn't work then good chance this won't work neither:
So I changed it to the column that is the join between the tables Customer Key and same thing, it just shows the total in the visulization not the top 5.
Oh and I tried your TopN Dax, Same thing. My joins all apear correct, but obviously they art not. I am realitively new to BI and am really stumped by this. I need to understand the mechanism on why it is not creating individual entries. I have worked with SQL and Excel for a long time and I am a little lost on this error.
@330SMG can you maybe share the file? It's really hard to say what is broken without looking at it in this case.
P.S.
Check out my showcase report:
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Give it a thumbs up if you liked it 🙂
Ok How do I share the file? I am really new to the world of BI.
That report is impressive.
@330SMG you can put in something like dropbox and share the link here or put it in your onedrive / gdrive and make that file public and put the link here.
Thanks for the compliment 🙂 Please give it a like 🙏
@330SMG you used it with first name instead of key.
Yes I did that as an experiment and it did not work. It is supposed to be by first name. I should have reverted it before sharing.
@330SMG didn't get what you mean.
1) With customer key it's working fo you right?
2) You want top 5 by first name?
No It did not work with customer key only getting that total not the list of people.
yes I need by first name.
Ok, no worries. It's late here so let's continue tomorrow 🙂
Please go check out my reportt and kudos it if you liked it 🙂
@330SMG this is the measure for top 5 first names:
Top5 First Names =
CALCULATE(
[Total Orders],
FILTER(
VALUES(DimCustomer[FirstName]),
IF(RANKX(ALL(DimCustomer[FirstName]),[Total Orders],,DESC)<=5,[Total Orders],BLANK())
)
)
After you created the measure you need to make sure to put the right column in the visual (In this case. [FirstName], in the previous case [CustomerKey]). That is why in both cases I get the right result with the same data you have.
Thanks, I just over thought it.
User | Count |
---|---|
86 | |
82 | |
68 | |
65 | |
55 |
User | Count |
---|---|
123 | |
100 | |
90 | |
83 | |
66 |