Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
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.
Thanks,
Lydia Zhang
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 137 | |
| 102 | |
| 71 | |
| 67 | |
| 65 |