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

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

Reply
RobertSlattery
Responsive Resident
Responsive Resident

SUMX vs Calculate Filter

Can someone please help me to understand why this doesn't work...

Order Book = 
CALCULATE(
    CALCULATE(
        SUMX(orders, IF([Status] = 60, [Value])),
        FILTER(
            Orders,
            [Status] = 60
            && [Inv Date] >= MAX('Dim Date'[Date Key])
            || [Status] <> 60
        )
    ),
    Filter(
        ALLSELECTED('Dim Date'),
        'Dim Date'[Date] < MAX('Dim Date'[Date])
        && MAX('Dim Date'[Date]) < TODAY()
    )
)

Or this...

Order Book 2 = 
CALCULATE(
    [Order Intake],
    FILTER(
        Orders,
        [Status] = 60
        && [Inv Date] >= MAX('Dim Date'[Date Key])
        || [Status] <> 60
    ),
    Filter(
    ALLSELECTED('Dim Date'),
    'Dim Date'[Date] < MAX('Dim Date'[Date])
    && MAX('Dim Date'[Date]) < TODAY()
    )
)

And this does...

Order Book 3 = 
CALCULATE(
    SUMX(Orders,
        IF(
            [Status] = 60
            && [Inv Date] >= MAX('Dim Date'[Date])
            || [Status] <> 60,
            [Order Intake]
        )
    ),
    Filter(
        ALLSELECTED('Dim Date'),
        'Dim Date'[Date] < MAX('Dim Date'[Date])
        && MAX('Dim Date'[Date]) < TODAY()
    )
)

example uploaded here

1 REPLY 1
Anonymous
Not applicable

HI @RobertSlattery,

 

Maybe you can try to use below measure formula:

Order Book 2 = 
CALCULATE (
    SUM ( Orders[Value] ),
    FILTER (
        ALLSELECTED ( Orders ),
        [Status] = 60
            && [Inv Date] >= MAX ( 'Dim Date'[Date Key] )
            || [Status] <> 60
    ),
    FILTER (
        ALLSELECTED ( 'Dim Date' ),
        'Dim Date'[Date] < MAX ( 'Dim Date'[Date] )
            && MAX ( 'Dim Date'[Date] ) < TODAY ()
    )
)

If above not help, please explain your requirement more clearly with some expected result to help us clarify your scenario.

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
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.

Top Solution Authors