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
elouizi
Helper II
Helper II

previousmonth not working even with date column

I struggeling with one messaure that is giving me blanks as a results.
 
Flow_Website_CellPhone_PREVIOUSMONTH =
 
Mesaure1: Sum(Flow[Events]) 
CALCULATE( [Mesaure1];PREVIOUSMONTH(Flow[Date]);Flow[Flow]="Website_CellPhone")
 
First messaure works perfect. 
All the months have data.
column is date column.
 
When I create a second messure, it fails when using in a card visual or any other chart
 
I use a date as a column to generate the previous month. I have selected one month in my filter.
What am I doing wrong?
 
 
 
 
 
3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

Sometimes working with Time Intellgence functions can be frustrating. See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks for sharing.

 

I tried addmonth function and subtracted a month.

But that did not work.

Any other idea.

 

 

Hello everyone,

 

Just created a table in power bi. with the following colums

date

currentEvent

PreviuousMonth event.

 

With these colums. It works.

But when I remove the date colum and replace it with yearmonth. IT does NOT work. I get blank.

It seems that it does not reconize yearmonth as a date but as text and PowerBI does not know how to deal with this. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.