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
Neil24
Frequent Visitor

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, @Neil24 ;


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, @Neil24 ;

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