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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Patto
Helper II
Helper II

SUM a nested CALCULATE within a SummarizeColumns?

Hi all

Hoping I can get some quick help on this.
I have the following CALCULATE statement inside a SUMMARIZECOLUMNS and I want to wrap it in a SUM.

--This is my current calculate statement which works a treat. It is just calculating a column and putting 0 where I have blanks in another calculation.
CALCULATE(
    IF(
        ISBLANK(
            CALCULATE(
                SUM('Measures - Load Planning'[EFTSL])
                ,'Load Cycle'[Load Cycle Month Day] = "October 31"
                ,'Load Year'[Load Year Cycle] = -1
                ,'Progress Category'[Progress Category Code] = "CT1"
            )
        )
    ,0
    ,CALCULATE(
        SUM('Measures - Load Planning'[EFTSL])
        ,'Load Cycle'[Load Cycle Month Day] = "October 31"
        ,'Load Year'[Load Year Cycle] = -2
        ,'Progress Category'[Progress Category Code] = "CM1"
    )
    )
)


All I want to do now is basically wrap that whole thing in a
CALCULATE(
    SUM( {above statement here})
    ,ALLSELECTED(a column on the table)
)

Does this make sense? Can anyone help?
Cheers

1 ACCEPTED SOLUTION

Hi

Yeah that was one of the first things I tried but it didnt work.
In the end I managed to get it working by creating another calculated table off the original and doing my calcs in there.
Thanks anyway.
Cheers

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Well... instead of asking here you could just do what you suggest and see if it works 🙂

However,

Best
D

Hi

Yeah that was one of the first things I tried but it didnt work.
In the end I managed to get it working by creating another calculated table off the original and doing my calcs in there.
Thanks anyway.
Cheers

Anonymous
Not applicable

Of course, there's no "however"...

Best
D

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors