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
blazko
Helper III
Helper III

MAX of calculation, with filter

Hi, I have small problem with creating a measure. Here's what I got:

max/day = IF(
    ISFILTERED('a/b'[a/b]);
    MAXX(
        'BASE data';CALCULATE(SUM('BASE data'[qty]);ALLEXCEPT('BASE data';'BASE data'[date];'BASE data'[a/b])));
    MAXX(
        'BASE data';CALCULATE(SUM('BASE data'[qty]);ALLEXCEPT('BASE data';'BASE data'[date]))))

And I have problem this working with a "a/b" slicer. 

It should calculate max of qty sum calculated by a day, from selected time period. In this example a date hierarchy in matrix visual, with a drill down option through year, quarter, month, week.

The problem is I figured out something that works only partially. With one or none selection (isfiltered: true/false). What i want is that this calculation worked also with both options selected on slicer (sum a+b).

Thx in advance for any reply.

2 REPLIES 2
Anonymous
Not applicable

Hi @blazko,

 

Maybe you can try to use below measure if it works for your requirement:

Check Range =
MAXX (
    SUMMARIZE (
        FILTER (
            ALLSELECTED ( 'BASE data' );
            'BASE data'[a/b] IN ALLSELECTED ( 'a/b'[a/b] )
        );
        [date];
        [a/b];
        "SUM"; SUM ( 'BASE data'[qty] )
    );
    [SUM]
)

If above not help, please provide some sample data for analysis.

 

Regards,

Xiaoxin Sheng

Hi, thanks for the responce, sadly yours solution wasnt working for me. 
Found one of my own, simple:

max  = MAXX(calculated_date;MAXX(calculated_date;CALCULATE(SUM('BASE data'[qty]))))

And it calculates through all the slicers I can get from the table, not only "a/b".

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