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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
cheid1977
Advocate I
Advocate 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.