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

How to hide cumulative bars if null/blank

Hi all,

 

I'm currently working on this chart, and as Q3 and Q4 data are not in yet, is there a way I can hide the Q3 and Q4 dark blue bars?

GregGiamz_0-1689930806226.png

 

This is the simplified dataset:

DateQ1Q2Q3Q4
realized 8020NULLNULL
forecasted68927374


I had used the 'running total' quick measure to get the cumulative totals, and this was the resulting formula for 'realized' chart:

CALCULATE(

    SUM(Realized),

    FILTER(

        CALCULATETABLE(

            SUMMARIZE('Calendar', 'Calendar'[CurrentDayOffset], 'Calendar'[Date]),

            ALLSELECTED('Calendar')

        ),

        ISONORAFTER(

            'Calendar'[CurrentDayOffset], MAX('Calendar'[CurrentDayOffset]), DESC,

            'Calendar'[Date], MAX('Calendar'[Date]), DESC

        )

    )

)

 

Any help would be appreciated, thank you!
 

 

1 ACCEPTED SOLUTION
Kishore_KVN
Super User
Super User

Hello @GregGiamz ,

Please ignore blanks during the calculation. Your measure should look as below:

If(IsBlank(Realized),Blank(),

CALCULATE(

    SUM(Realized),

    FILTER(

        CALCULATETABLE(

            SUMMARIZE('Calendar', 'Calendar'[CurrentDayOffset], 'Calendar'[Date]),

            ALLSELECTED('Calendar')

        ),

        ISONORAFTER(

            'Calendar'[CurrentDayOffset], MAX('Calendar'[CurrentDayOffset]), DESC,

            'Calendar'[Date], MAX('Calendar'[Date]), DESC

        )

    )
)

 

If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!

View solution in original post

1 REPLY 1
Kishore_KVN
Super User
Super User

Hello @GregGiamz ,

Please ignore blanks during the calculation. Your measure should look as below:

If(IsBlank(Realized),Blank(),

CALCULATE(

    SUM(Realized),

    FILTER(

        CALCULATETABLE(

            SUMMARIZE('Calendar', 'Calendar'[CurrentDayOffset], 'Calendar'[Date]),

            ALLSELECTED('Calendar')

        ),

        ISONORAFTER(

            'Calendar'[CurrentDayOffset], MAX('Calendar'[CurrentDayOffset]), DESC,

            'Calendar'[Date], MAX('Calendar'[Date]), DESC

        )

    )
)

 

If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!

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.