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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Syndicate_Admin
Administrator
Administrator

That cumulative sum graph does not show value if it does not correspond

Good morning, I need to make a daily sales sum graph of the current month compared to the previous year, but I need you to only show me until the current day of the current month and not repeat the value of the sum until the last day.

francogh_0-1648638228183.png

This is the code I use.

Spoiler
Cumulative 2022 = CALCULATE([TOTAL my 2022],
FILTER(ALLSELECTED('412 - DIARIES'),'412 - DIA'[DIA] <= MAX('412 - DIA'[DIA]
)))

3 REPLIES 3
MFelix
Super User
Super User

Hi @Anonymous ,

 

Try to use the following measure:

 

Cumulative 2022 =
CALCULATE (
    [TOTAL my 2022],
    FILTER (
        ALLSELECTED ( '412 - DIARIES' ),
        '412 - DIA'[DIA] <= MIN ( TODAY (), MAX ( '412 - DIA'[DIA] ) )
    )
)

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Thanks for the reply, it appears the same way using that code.

francogh_0-1648644483401.png

Hi @Anonymous ,

 

You want the value to be blank when is higher than today is that it?

 

Try the following code:

 

Cumulative 2022 =
IF (
    SELECTEDVALUE ( '412 - DIA'[DIA] ) <= TODAY (),
    CALCULATE (
        [TOTAL my 2022],
        FILTER (
            ALLSELECTED ( '412 - DIARIES' ),
            '412 - DIA'[DIA] <= MAX ( '412 - DIA'[DIA] )
        )
    )
)

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.