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
cheid1977
Helper I
Helper I

SamePeriodLastYear

Over the last few months I have created multiple dashboards using DirectQuery. Within the dashboards I used the "SAMEPERIODLASTYEAR" function and it worked without any problems. I recently had my computer reimaged. I reconnected all the dashboards and now some of my visuals won't display because the "SAMEPERIODLASTYEAR" fucntion is not compatible in DirectQuery.  Has something changed within Power BI? Is there a trick to getting this to work?  Thanks in advanced for your help.

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

 

maybe enabling this option will resolve your issue

unrestricted DAX in DirectQuery.png

 

Maybe this document will also be of interest

https://docs.microsoft.com/en-us/sql/analysis-services/tabular-models/dax-formula-compatibility-in-d...

 

And also this site may be of interest, there are a lot of examples available how to rewrite TimeIntelligence functions, if these functions are not available (this site has been responsible that I write all my DAX statements without the usage of special timeintelligence functions :-))

http://www.daxpatterns.com/time-patterns/

 

Hope this helps

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

1 REPLY 1
TomMartens
Super User
Super User

Hey,

 

maybe enabling this option will resolve your issue

unrestricted DAX in DirectQuery.png

 

Maybe this document will also be of interest

https://docs.microsoft.com/en-us/sql/analysis-services/tabular-models/dax-formula-compatibility-in-d...

 

And also this site may be of interest, there are a lot of examples available how to rewrite TimeIntelligence functions, if these functions are not available (this site has been responsible that I write all my DAX statements without the usage of special timeintelligence functions :-))

http://www.daxpatterns.com/time-patterns/

 

Hope this helps

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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.