Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

matrix table, can I lock date order but allow product order to be filtered by sales value

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)

 

table example.png

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@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.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors