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! Learn more

Reply
Anonymous
Not applicable

calculate minimum of each row based on measure

I have a table that shows number of days past since the last sale per category for every salesperson(ID) as seen below:
The number of days are calculated by a measure I have made. 

Min_days.PNG

The column "row minimum" is the subtotal column of the power bi matrix visual and for some reason instead of showing total, it shows the row minimum which is what I actually want(!)

I would like to have a filter on the "row minimum" column though.

Is this possible, or do I neet to make my own measure that calculates the Row minimum? (which is in fact the minimum accross every category for each salesperson_ID).

How can I do this?

4 REPLIES 4
AlB
Community Champion
Community Champion

@Anonymous 

I forgot the DISTINCT:

Min measure =
MINX( DISTINCT(Table1[Category]), [YourMeasure])

If this doesn't work, I'd probably need to see the pbix

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

AlB
Community Champion
Community Champion

@Anonymous 

Question 1:  It has to do with the autoexist behaviour in PowerBI. Even with a measure that returns a constant, (MeasureT = 5  for example) you'll see that those cells remain blank.  Check these out, perhaps other resources on the web:

https://www.sqlbi.com/articles/understanding-dax-auto-exist/

https://www.sqlbi.com/articles/autoexist-and-normalization/

Question 2:

A quick n dirty solution for that visual would be to create another measure based on the one you have:

 

BSN_days_since_last SALE TOTAL Row = 
CALCULATE([BSN_days_since_last SALE], ALL(sales[category]))

 

 and use it as a filter for the visual. See it all at work in the attached file (Page 2)

 

image.png

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

AlB
Community Champion
Community Champion

Hi @Anonymous 

Create a measure

Min measure =
MINX( Table1[Category], [YourMeasure])

 where Table1[Category] is the field you have in the columns of your matrix visual

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

Anonymous
Not applicable

Hi AIB, the MINX function accepts a table as a first arguement and not a column.

So it can not be "Table1[Category]" like you suggest but "Table1" and this does not work i'm afraid...

Any other idea? 

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.