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

Sameperiodlastyear Direct Query

How can I do same formula than Sameperiodlastyear in Direct Query ?

 

I have sales regarding 2 dates segment filter.

I yould like to have same result regaring last 2 dates year.

1 REPLY 1
Anonymous
Not applicable

Hi @Nibz,

You are able to use Sameperiodlastyear function in DirectQuery mode as long as you enable “Allow unrestricted measures in DirectQuery mode” in Power BI Desktop. You can review example in the following screenshots.
1.PNG2.PNG

Thanks,
Lydia Zhang

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.