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
ddpl
Solution Sage
Solution Sage

measure did not work due to sort by column...

While calculating max value in each row of matrix by...

 

max_row = MAXX(ALLSELECTED(tab[Col1]), [TotalCount])

 

without sorting Col1 by another column it will give what I want but with sorting Col1 by another column max_row value give me wrong value.

 

Any suggestions...

 

1 ACCEPTED SOLUTION
ddpl
Solution Sage
Solution Sage

There are Col1, Col2 and a measure

Col1 is sort by Col2

so, I have to change my measure by ...

 

max_row = MAXX(ALLSELECTED(tab[Col1], tab[Col2]), [TotalCount])

 

SQLBI_BLOG_ON_THIS 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @ddpl ,

Have you solved your problem?  If so, please kindly mark your answer as the solution to close the case.

If not, please provide more details with your desired output and pbix file without privacy information (or some sample data).

 

How to Get Your Question Answered Quickly 

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ddpl
Solution Sage
Solution Sage

There are Col1, Col2 and a measure

Col1 is sort by Col2

so, I have to change my measure by ...

 

max_row = MAXX(ALLSELECTED(tab[Col1], tab[Col2]), [TotalCount])

 

SQLBI_BLOG_ON_THIS 

amitchandak
Super User
Super User

@ddpl , Not very clear.

You can not use measure as sort by column field.

 

Depending on visuals you can sort by Axis/Value.

 

On Table visual you can sort on more than one column by pressing shift

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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