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
yolanda_meng
Frequent Visitor

Error with PREVIOUSMONTH with calculated column

Has anyone noticed a difference today on PowerBI.com around the PREVIOUSMONTH function?

 

We have a DirectQuery report that is using this function, the month part was a calculated column from a date field, it was working fine on PowerBI.com for long time. Today we started to notice that the chart with this function was broken, after testing, we realized it was the incompatibility of the function with a calculated column - the error went away after we switched to a non-calculated column. 

 

The calculated month column: Month = DATE(YEAR(Query1[CreatedDate]),MONTH(Query1[CreatedDate]),1)

The measure with PREVIOUSMONTH: TEST = CALCULATE(COUNT(Query1[ClientId]),PREVIOUSMONTH(Query1[Month]))

 

Please provide any feedbacks or any thoughts, thanks a lot!

1 ACCEPTED SOLUTION

@yolanda_meng i got bad news. Now the PREVIOUSMONTH  is not supported into Directquery.

 

take a look in this article, and you will see: "This DAX function is not supported for use in DirectQuery mode. For more information about limitations in DirectQuery models, see http://go.microsoft.com/fwlink/?LinkId=219172."

 

After your see this article i reccomend you to see the second link, to see all limitations with DAX. It has been changed probally in this last update.

 

don't forget to mark this post as solution, other people can have the same situation in the future.

 

 

 

 

 

View solution in original post

12 REPLIES 12

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.

Top Solution Authors
Top Kudoed Authors