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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Cumulative bar chart comparing months by year

Hello

 

I'm doing a clustered column chart showing quotes sent in each calendar month for both 2021 and 2022. The chart is displaying the May 2022 value for future months where I have no data. I want to show all of 2021 but only 2022 up to the current month where I have data (May 2022).

Neil24_0-1651593059361.png

Can anyone help me please?

1 ACCEPTED SOLUTION
speedramps
Super User
Super User

Create a dax masure a but like this to return the value is the date <= today, 

and return dull when the value is > today

 

Graphvalue =
IF(
MIN(Table[date]) <= [todaysdate],

SUM(Table[value]),

BLANK()
)

 

I have helped you now please help me with kudos.
I am a Power BI volunteer so please click the thumbs up if you like me trying to help you.
And click Accept As Solution if I have fixed your problem.
One problem per ticket please. If you need to expand or change your problem then please accept this solution and raise a new ticket. Many thanks 😀

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;


Is your problem solved? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

As I said, but since it's summation, you can change it to:

value =
IF (
    MIN ( Table[date] ) <= TODAY (),
    CALCULATE (
        SUM ( Table[value] ),
        FILTER ( ALL ( 'table' ), [date] <= MAX ( [date] ) )
    ),
    BLANK ()
)


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

speedramps
Super User
Super User

Create a dax masure a but like this to return the value is the date <= today, 

and return dull when the value is > today

 

Graphvalue =
IF(
MIN(Table[date]) <= [todaysdate],

SUM(Table[value]),

BLANK()
)

 

I have helped you now please help me with kudos.
I am a Power BI volunteer so please click the thumbs up if you like me trying to help you.
And click Accept As Solution if I have fixed your problem.
One problem per ticket please. If you need to expand or change your problem then please accept this solution and raise a new ticket. Many thanks 😀

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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