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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
cristianml
Post Prodigy
Post Prodigy

YTD Measure

Hi,

 

I have an issue with the following measure that works ok except for the month 9 (September).

 

=CALCULATE([Rev Master],DATESBETWEEN(Period[[Month]]],IF(MONTH(TODAY())>=9,DATE(YEAR(TODAY()),9,1),DATE(YEAR(TODAY())-1,9,1)),IF(MONTH(TODAY())=9,TODAY(),EDATE(TODAY(),-1))))

 

What changes shoud I make to fix this ?

 

 

 

1 ACCEPTED SOLUTION
AntrikshSharma
Super User
Super User

@cristianml 

 

1. The code seems to be incorrect, DATESBETWEEN's first argument should contain Date column, that column doesn't seem like a Date column in your code

2. The way of asking the question is wrong, don't just paste code and expect others to answer, always provide the data and the screenshot of issue that you are facing.

View solution in original post

1 REPLY 1
AntrikshSharma
Super User
Super User

@cristianml 

 

1. The code seems to be incorrect, DATESBETWEEN's first argument should contain Date column, that column doesn't seem like a Date column in your code

2. The way of asking the question is wrong, don't just paste code and expect others to answer, always provide the data and the screenshot of issue that you are facing.

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.