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
cflynn_29
Helper I
Helper I

Getting a Measure to read ZERO (0) when the slicers read all selected

Hi All,

 

I have the following measure 

 

2.6 = MAXX(VALUES(Data[School]), [Area max per School])
                                  Table - Column - Measure
 
But when the School Filter reads ALL i would like to read (0) until a school is selected. Will a selected value work? Or anything really i havent been terrbily successful.
 
Thank you,
1 ACCEPTED SOLUTION
sturlaws
Resident Rockstar
Resident Rockstar

Hi @cflynn_29 

 

have you tried to write your measure like this?

2.6 = if(hasonevalue(data[school]),MAXX(VALUES(Data[School]), [Area max per School]),0)

 

Cheers,
Sturla

View solution in original post

2 REPLIES 2
sturlaws
Resident Rockstar
Resident Rockstar

Hi @cflynn_29 

 

have you tried to write your measure like this?

2.6 = if(hasonevalue(data[school]),MAXX(VALUES(Data[School]), [Area max per School]),0)

 

Cheers,
Sturla

Anonymous
Not applicable

Don't understand why there's MAXX in there... This returns the same output:

if( hasonevalue( data[school] ),
   [Area max per School],
   0
)

which can also be compacted to:

hasonevalue( data[school] ) * [Area max per School]

 

The two (and the one given by @sturlaws) are exactly the same.

 

Best

D

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.