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
Anonymous
Not applicable

MDX code for Date range

Hi,

I am trying to select the current date and go back in time one year, 365 days.

Would you know how could I do this through a MDX query? 

Thanks in advance,

Regards,

4 REPLIES 4
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

It seems that MDX  is used in SSAS, here is Power BI forum.

 

For your requirement,  You'd better post your thread to SSAS Forum to get more professional help.

 

If you need additional help about Power BI, please feel free to ask.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Cherry,

The MDX code is used in PowerBI to make a call of the last 365 days from SAP Business Warehouse.

 

Thanks

Floriankx
Solution Sage
Solution Sage

Hello,

 

you can either use SAMEPERIODLASTYEAR or DATEADD

 

Best regards

quentin_vigne
Solution Sage
Solution Sage

Hi @Anonymous

 

I think that's something like LASTPERIODS(365) 

 

 

- Quentin

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.