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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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