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
I am using a matrix table to mirror the function of a pivot table.
In my first column I have year, which expands to month and then month expands to product. I then have a second column with total sales by year/ month/ product.
I would like for the date and month order to stay fixed but apply a secondary sort to the sales column so that the products will then be in the order of highest value to lowest value, rather than alphabetical. If I try and apply this sort, it sorts all the sales values, so reorders the months and years as well as the products ( so November ends up before October etc).
Is there a way to apply this sort only to the product sales and ignore the month and year totals? or would I have to present the data differently inthe table to make this work?
in the attached image (I had to scrub the data so I hope it makes sense) the current order is correct year and date order but product alphabetical. ideally I would like the date and year to stay the same but product order to change to G, F, O, U, W (highest to lowest)
@Anonymous I can't think of a way to do that as I am not aware of any DAX visuals that support two levels of sort order. Only thing I can think of would be to come up with a RANKX measure to rank your products and then add that to your year and month, so something like:
YEAR([Date])*1000 + MONTH([Date])*100 + [RANKX measure goes here]
You would then sort the table by this measure.
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!