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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

YTD by month DAX formula not showing all months

I have this formula:

 

YTD Budget = VAR MaxMonth = [MaxMonth]

RETURN CALCULATE([CustomerBudget],'Date'[MonthNum] <= MaxMonth)

 

It works but it's showing YTD Budget (same number) for every month.

 

burget YTD.PNG

 

How do I hide all the future months and only show in this case January. So similar how Yago YTD is showing up. 

 

Thank you for your help!!!

2 ACCEPTED SOLUTIONS

Probably the budget is not blank then, perhaps check if the sales column is blank?

 

Your formula would be:

YTD Budget (final) = VAR MaxMonth = [MaxMonth]
RETURN IF(NOT(ISBLANK([Sales])),
CALCULATE([CustomerBudget],'Date'[MonthNum] <= MaxMonth), blank())

View solution in original post

Anonymous
Not applicable

YES!!! This formula worked:

 

YTD Budget (final) = VAR MaxMonth = [MaxMonth]
RETURN IF(NOT(ISBLANK([Sales])),
CALCULATE([CustomerBudget],'Date'[MonthNum] <= MaxMonth), blank())
 
Thank you so much for your help, Steve!!! Much appreciated

View solution in original post

7 REPLIES 7
stevedep
Memorable Member
Memorable Member

Hi,

 

IF(NOT(ISBLANK([CustomerBudget] ), CALCULATE([CustomerBudget],'Date'[MonthNum] <= MaxMonth), BLANK())
Anonymous
Not applicable

Thank you so much, Steve, but something is not working:

 

formula.PNG

You would still need the var. 

 

YTD Budget = VAR MaxMonth = [MaxMonth]

RETURN 
if(not(blank([CustomerBudget]),
CALCULATE([CustomerBudget],'Date'[MonthNum] <= MaxMonth), blank())
Anonymous
Not applicable

YTD Budget = VAR MaxMonth = [MaxMonth] RETURN IF(NOT(ISBLANK([CustomerBudget])),
CALCULATE([CustomerBudget],'Date'[MonthNum] <= MaxMonth), blank())
 
This formula is still returning repeating values for every month 😞 It's not showing blanks for future months 😞

Probably the budget is not blank then, perhaps check if the sales column is blank?

 

Your formula would be:

YTD Budget (final) = VAR MaxMonth = [MaxMonth]
RETURN IF(NOT(ISBLANK([Sales])),
CALCULATE([CustomerBudget],'Date'[MonthNum] <= MaxMonth), blank())
Anonymous
Not applicable

YES!!! This formula worked:

 

YTD Budget (final) = VAR MaxMonth = [MaxMonth]
RETURN IF(NOT(ISBLANK([Sales])),
CALCULATE([CustomerBudget],'Date'[MonthNum] <= MaxMonth), blank())
 
Thank you so much for your help, Steve!!! Much appreciated

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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