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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.