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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi everyone,
i want to filter top 5 by cost of material and visualize it. The following DAX doesnt yield the desired result
Top5 = TOPN(5; SUMMARIZE(Sheet1; Sheet1[Material];"devcosts"; SUM[costs])
after breaking down the DAX to
tmptable = SUMMARIZE(Sheet1; Sheet1[Material];"devcosts"; SUM[costs])
i could see that the cost column is unsorted, like so
how can i get a sorted cost column for the TOPN function to select from and deliver the right solution.
thanks in advance
Solved! Go to Solution.
@Anonymous
Try following
Top5 =
TOPN (
5,
SUMMARIZE ( Sheet1, Sheet1[Material], "devcosts", SUM[costs] ),
[devcosts], DESC
)
Hi @Anonymous
If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly. thanks a lot!
@Anonymous
Try following
Top5 =
TOPN (
5,
SUMMARIZE ( Sheet1, Sheet1[Material], "devcosts", SUM[costs] ),
[devcosts], DESC
)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 104 | |
| 82 | |
| 72 | |
| 46 | |
| 35 |