Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I am trying use PREVIOUSMONTH to get the previous month value. My data looks like this
I calculated previous from current value using PREVIOUSMONTH, but i get one extra month March 2017.
Previousvalue =
CALCULATE(
'xyz'[CurrentValue],
PREVIOUSMONTH('xyz'[ReportDate].[Date]))
Can someone help me understand why am i getting March, though my date column stops at feb 2017? Thank you,
Solved! Go to Solution.
@Janaki wrote:
Hi,
Thank you. The currentvalue that I am using is a measure. Would you have a alternate suggestion?
Then just try
Previousvalue =
IF (
    ISBLANK ( MAX ( xyz[ReportDate] ) ),
    BLANK (),
    CALCULATE (
         'xyz'[CurrentValue],
        PREVIOUSMONTH ( dimdate[Date].[Date] )
    )
)
					
				
			
			
				
			
			
				
			
			
				
			
			
			
			
			
		
@Janaki wrote:
Hi,
I am trying use PREVIOUSMONTH to get the previous month value. My data looks like this
I calculated previous from current value using PREVIOUSMONTH, but i get one extra month March 2017.
Previousvalue =
CALCULATE(
'xyz'[CurrentValue],
PREVIOUSMONTH('xyz'[ReportDate].[Date]))
Can someone help me understand why am i getting March, though my date column stops at feb 2017? Thank you,
It seems by design. If you don't like it, try to apply some tricks as
Previousvalue =
IF (
    ISBLANK ( MAX ( xyz[ReportDate] ) ),
    BLANK (),
    CALCULATE (
        SUM ( 'xyz'[CurrentValue] ),
        PREVIOUSMONTH ( dimdate[Date].[Date] )
    )
)
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		Hi,
Thank you. The currentvalue that I am using is a measure. Would you have a alternate suggestion?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
            | User | Count | 
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | 
| User | Count | 
|---|---|
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |