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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
semidevil
Helper I
Helper I

Does previous month look at the previous month of today, or highest month in date table?

I was just curious and want to make sure i"m using Previous month correctly.

 

Does previous month return all values  from the previous month of Today (i,e it'll return January results since today is Feb), or does it return the previous month of the highest month in my date table (i,e  If I already have dates for all of 2018, it'll always return values from November)?

 

I wanted values from January, but PreviousMonth did not work for me, so I ended up just creating a bunch of "helper" columns and using the Today() function.

 

 

1 REPLY 1
Phil_Seamark
Employee
Employee

Hi @semidevil

 

The PREVIOUSMONTH function will give you the previous month of the date you provide.  So if you provide a date that happens to be in Feb 2018, it will return Jan 2018 regardless of how much in the future your data goes.

 

I do recommend you make sure you use a Date/Calendar table that has a row for every date (no gaps or overlaps) and use a field from that table with the PREVIOUSMONTH function.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.