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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi All,
I've got order detail data that i would like to summarize on order level and the rank each order by size.
My data looks like this:
CompanyCode - CustomerCode - OrderNum - OrderLine - Product - Qty - Price
What i've done is create a measure called "Total Sales" = SUMX(OLine;OLine[OrderQty] * OLine[UnitPrice])
which gives me a sum for each line.
but some orders have many lines, and when i try to use the RankX function, it only ranks the lines by size. So i was wondering if there is a way of getting the rankx to look at each OrderNum and add up all OrderLines and then give me the ranks.
Thanks.
Hi @AndersLearning,
Can you share a dummy sample please? The trick could be the functions ALL, ALLEXCEPT, ALLSELETED.
Best Regards.
Dale
Hi, Sorry for the slow reply.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 61 | |
| 54 | |
| 41 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 106 | |
| 99 | |
| 38 | |
| 29 | |
| 28 |