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,
I am trying to apply RANKX function to show bottom 5 records based on amount which I am able to achieve.
Next I want is it should filter my data based on specific condition and then apply rankx fubction.But I am not able to achieve desired result. Need help with DAX to implement the same,
e.g: When I apply normal Rank function to show bottom 5 product type by Amount then I get results(A,B,C,D,E)
I want dax to show bottom 5 product type by product amount where transaction no >1 i.e (B,C,D,E,F)
Product Type Product Amount No of Transaction Rank Rank( Excluding transaction where no is >1)
A 10 1 1
B 20 12 2 1
C 30 30 3 2
D 40 45 4 3
E 50 15 5 4
F 60 60 5
Thanks in advance.
Hi,
Create 2 measures as below and drag 'Product Rank' measure in the table:
Total Amount = SUM( Data[ProductAmount] )
Product Rank = IF( SUM( Data[NoOfTransactions] ) <> 1, RANKX( ALL( Data ), [Total Amount], ,ASC ) - 1, "No Rank" )
Here's what i got:
Thanks.
Hi Vaibhav,
Thanks ..But some how I am not getting expected results.
DAX i m using :
Am I doing anything wrong?...my rank is not starting with 1.
Kindly suggest.
Thanks!
Hi,
Can you try to replace ALL(Query2[DESCRIPTION]) with ALL(Query2)
Thanks.
Hey Thanks @Anonymous
Tried with ALL(Query) still not able to get the correct rank..Please see below.
Can you share some sample data?
Thanks.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
7 | |
5 | |
4 | |
3 |
User | Count |
---|---|
12 | |
11 | |
10 | |
9 | |
8 |