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
USEERTEST51151
Frequent Visitor

Filtering the minimum value of a measure

Hello!

 

I am working with a matrix that contains two variables, "month" and "type," and a calculated measure called "measure1." My goal is to filter the matrix to retain only the row(s) with the minimum value of "measure1," excluding any null values. I want to focus on the specific month and corresponding values related to this minimum measure and obtain a single row in the final output. However, the large size of the dataset (~6 million rows) is causing performance challenges.

 

Matrix used:

 Type 
MonthABCTotal
10.450.510.010.97
20.250.240.010.5
30.050.020.250.32
40.50.20.010.71
50000

Desired output:

 Type 
MonthABCTotal
30.050.020.25

0.32

 

Can you please help me out?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @USEERTEST51151 ,

 

I think you can create a measure to filter your martix in visual level filter.

Sample:

vrzhoumsft_1-1728547050191.png

vrzhoumsft_0-1728547036452.png

Measure:

Filter = 
VAR _MIN = MINX(ALLSELECTED('Table'),CALCULATE(SUM('Table'[Value]),ALLEXCEPT('Table',DimMonth[Month]))+0)
RETURN
IF([Measure] = _MIN,1,0)

Add this measure into visual level filter and set it to show items when value = 1.

vrzhoumsft_2-1728547093871.png

 

Best Regards,
Rico Zhou

 

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

 

 

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

I am not sure how much i can help but i'd like to try.  Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
OktayPamuk80
Responsive Resident
Responsive Resident

Hi,

Shortly, did you check the visual calculations introduced in february '24?

https://powerbi.microsoft.com/en-us/blog/visual-calculations-preview/

 

Regards,

Oktay

Is not helping me that much since I am trying to get that line only.

 

Anonymous
Not applicable

Hi @USEERTEST51151 ,

 

I think you can create a measure to filter your martix in visual level filter.

Sample:

vrzhoumsft_1-1728547050191.png

vrzhoumsft_0-1728547036452.png

Measure:

Filter = 
VAR _MIN = MINX(ALLSELECTED('Table'),CALCULATE(SUM('Table'[Value]),ALLEXCEPT('Table',DimMonth[Month]))+0)
RETURN
IF([Measure] = _MIN,1,0)

Add this measure into visual level filter and set it to show items when value = 1.

vrzhoumsft_2-1728547093871.png

 

Best Regards,
Rico Zhou

 

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

 

 

you cannot measure a measure. You need to materialize it first.

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