cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
PabloMaldonado Regular Visitor
Regular Visitor

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
quentin_vigne Senior Member
Senior Member

Re: MDX code for Date range

Hi @PabloMaldonado

 

I think that's something like LASTPERIODS(365) 

 

 

- Quentin

Floriankx Established Member
Established Member

Re: MDX code for Date range

Hello,

 

you can either use SAMEPERIODLASTYEAR or DATEADD

 

Best regards

Community Support Team
Community Support Team

Re: MDX code for Date range

Hi @PabloMaldonado,

 

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.
PabloMaldonado Regular Visitor
Regular Visitor

Re: MDX code for Date range

Hi Cherry,

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

 

Thanks

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 52 members 1,193 guests
Please welcome our newest community members: