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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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