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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
JoaoMS
Helper III
Helper III

Cumulative chart with empty data in some months

Hi all, I have the following visualizations regarding cumulative Purchase Orders:

Graph.png

Due to there are no data for June in 2020, I need that the cumulative of June should be completed with the cumulative of the previous month. I'm using the following measure for "2020":

 

2020 = if(isblank([Monto YTD]),blank(),CALCULATE([Monto YTD] , DATESYTD(Calendario[Date])))

 

whrere:

* Monto YTD = SUM(PurchaseOrder[MontoUSD])

* Calendario = Calendar Table

 

Thanks in advance.

Joao

1 ACCEPTED SOLUTION

@JoaoMS , Try like

2020 = if(isblank([Monto YTD]) && max(Calendario[Date]) >today(),blank() ,CALCULATE([Monto YTD] , DATESYTD(Calendario[Date])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

9 REPLIES 9
Syndicate_Admin
Administrator
Administrator

Power bi rolled over per month with blank months

Diego565324_0-1697605822858.png

Good afternoon

Please, could you help me, I have companies with data up to the month of October ( 10) , when segment in month 10 , only Development appears. How do I make culture appear with its last accumulated of June (6)

Diego565324_1-1697605909238.png

amitchandak
Super User
Super User

@JoaoMS , then why are using isblank, remove that and try

2020 = CALCULATE([Monto YTD] , DATESYTD(Calendario[Date]))

This will give data in June

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi, thank you for the quick response. Indeed, it works for June, but now, the following months (september to december) have the cumulative of August, and I want those months to be "blank". Is there a way to consider those months empty? Regards, Joao

for that put a filter like this and try

My data example

YTD QTY forced=
var _max = today()
return
calculate(Sum('order'[Qty]),DATESYTD('Date'[Date]),'Date'[Date]<=_max)
//calculate(Sum('order'[Qty]),DATESYTD('Date'[Date]),filter('Date','Date'[Date]<=_max))

 

or

 

YTD QTY forced=
var _max = maxx('order',[Order date])
return
calculate(Sum('order'[Qty]),DATESYTD('Date'[Date]),'Date'[Date]<=_max)
//calculate(Sum('order'[Qty]),DATESYTD('Date'[Date]),filter('Date','Date'[Date]<=_max))

 

Commented is alternate option

Ideally, we should relative/advance filter , less than today

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi, I tried bothoptions but with the same previous results: * First formula with Today() resulted as using "2020 - CALCULATE([Monto YTD] , DATESYTD(Calendario[Date]))" * Second formula with MAXX resultad as using IF(Isblanck() ... Regards

@JoaoMS , Try like

2020 = if(isblank([Monto YTD]) && max(Calendario[Date]) >today(),blank() ,CALCULATE([Monto YTD] , DATESYTD(Calendario[Date])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

You Sir are my new hero. I have been seaching the forums and youtube channels for 5 days and tryed about 5 different measures and nothing fixed the line graph gap issue in a running sum or count for when a value in a row is blank. And then I found your solution which solved the problem. I would have thought that this is a relative common issue when wotking with cummulated values. I am super greatful to you Sir.

GreyWolf_0-1694661026279.png

 

Perfect, it works! Thank you

Greg_Deckler
Community Champion
Community Champion

@JoaoMS - Sorry, what is the question? 

 

Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.