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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Carpetperson
New Member

Dax Maxx function, but ignoring the Filter, and Slicers

I have a calculation that calculates the MAX value of a Measure: 
I used the Removefiltes it works but if you filter the actual visual the dax does not work anymore, kind of like a double negative:

My visual is a gauge, that is filter on the side panel on a specific Vertical. 
This is my code:

 

 

Max Outsourced Market Size = CALCULATE(
    MAXX(
        VALUES( Verticals[V1] ),
        CALCULATE(
            [Market Size Supply Chain] - [Market Size Outsourced],
            ALLEXCEPT(Verticals, Verticals[V1])
        )
    ),
    ALLEXCEPT(Verticals, Verticals[V1])
)

 

 

 I think it should also ignore the SELECTEDVALUE. Please help anyone.

 
1 ACCEPTED SOLUTION
Carpetperson
New Member

The solution was to create individual measures for each of the v1's then use the original script, then create the visuals using those individual scripts, then use the maxx function below on the max value of the gauge. Seems the problem is that you cannot ignore two filters in one formula.

Max Outsourced Market Size = CALCULATE(
    MAXX(
        VALUES( Verticals[V1] ),
        CALCULATE(
            [Market Size Supply Chain] - [Market Size Outsourced],
            ALLEXCEPT(Verticals, Verticals[V1])
        )
    ),
    ALLEXCEPT(Verticals, Verticals[V1])
)

 

View solution in original post

8 REPLIES 8
Carpetperson
New Member

The solution was to create individual measures for each of the v1's then use the original script, then create the visuals using those individual scripts, then use the maxx function below on the max value of the gauge. Seems the problem is that you cannot ignore two filters in one formula.

Max Outsourced Market Size = CALCULATE(
    MAXX(
        VALUES( Verticals[V1] ),
        CALCULATE(
            [Market Size Supply Chain] - [Market Size Outsourced],
            ALLEXCEPT(Verticals, Verticals[V1])
        )
    ),
    ALLEXCEPT(Verticals, Verticals[V1])
)

 

Anonymous
Not applicable

Hi @Carpetperson ,

Can you provide the .pbix file without sensitive data? And show the expected results as a picture?

If you are unsure how to upload data please refer to

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

Best Regards,
Wenbin Zhou

divyed
Super User
Super User

Hello @Carpetperson ,

 

To ignore selectedvalues, have you tried using all ?

 

Max Outsourced Market Size =
CALCULATE(
MAXX(
VALUES( Verticals[V1] ),
CALCULATE(
[Market Size Supply Chain] - [Market Size Outsourced],
ALL(Verticals[V1]) -- This removes any filters on Verticals[V1]
)
),
ALL(Verticals[V1]) -- Ignores the filter on Verticals[V1] for the outer CALCULATE as well
)

 

I hope this helps .

 

Cheers

LinkedIn : https://www.linkedin.com/in/neeraj-kumar-62246b26/

Hi @divyed  thank you for your response, your dax does the same as mine, it only ignores the first filter not that second one. 

bhanu_gautam
Super User
Super User

@Carpetperson ,Try using 

 

Max Outsourced Market Size =
CALCULATE(
MAXX(
VALUES(Verticals[V1]),
CALCULATE(
[Market Size Supply Chain] - [Market Size Outsourced],
REMOVEFILTERS(Verticals)
)
),
REMOVEFILTERS(Verticals)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Hi @bhanu thank you for your response, your dax does the same as mine, it only ignores the first filter not that second one. 

 

hi @Carpetperson ,

 

try like:

 

Max Outsourced Market Size = 
CALCULATE(
    MAXX(
        VALUES( Verticals[V1] ),
        CALCULATE(
            [Market Size Supply Chain] - [Market Size Outsourced],
ALL(Verticals),
VALUES(Verticals[V1])
        )
    ),
ALL(Verticals),
VALUES(Verticals[V1])
)

 

HI @FreemanZ thank you for your response, this gives the similar output, without ignoring the second filter. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.