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.
I have a sales table with below columns
And I want to create a calculated table that will store bottom n retailer sales per product with the following columns
How can I achive this result?
Solved! Go to Solution.
Hi @pravkan ,
I have built a data sample, please try to add two columns:
Rank Flag = RANKX('Table',[Total each Retailer],,ASC,Dense) *10+
RANKX(FILTER('Table',[Total each Retailer]=EARLIER('Table'[Total each Retailer])),[RETAILER_NAME],,ASC,Dense)
Final Rank = RANKX('Table',[Rank Flag],,ASC,Dense)
Output:
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 @pravkan ,
I have built a data sample, please try to add two columns:
Rank Flag = RANKX('Table',[Total each Retailer],,ASC,Dense) *10+
RANKX(FILTER('Table',[Total each Retailer]=EARLIER('Table'[Total each Retailer])),[RETAILER_NAME],,ASC,Dense)
Final Rank = RANKX('Table',[Rank Flag],,ASC,Dense)
Output:
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,
Share data in format that can be pasted in an MS Excel file. On that data, please also show the expected result very clearly.
Hi @Ashish_Mathur ,
This what I want to achieve with Power BI
I have a table called V_BOTTOM_SALES and I want to create a measure that will rank my bottom n retailer with their product subcategory.
I don't know if this is possible in dax?
Please read my previous post.
you can try this
Table 2 =
VAR tbl=TOPN(3,'Table','Table'[sales],ASC)
return SELECTCOLUMNS(tbl,"retailer",'Table'[Retiler_name],"product",'Table'[product],"sales",'Table'[sales])
pls see the attachment below
Proud to be a Super User!
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.