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
sohi429
Regular Visitor

DAX Equivalent Function for MDX PrevMember in Hierarchies

Our team is trying to move from PerformancePoint on SharePoint using SSAS cubes to Power BI making use of Fact and Dimension tables directly in the data model. To get the similar functionality in PowerBI as we had in PerformancePoint, we need to recreate some MDX formulas in DAX.

 

One of the formulas makes use of PrevMember function in MDX with hierarchies to calculate some values for KPI. Now, PrevMember is dynamic in nature, for example, when we select an year in the hierarchy, the KPI calculations are performed based on previous year, when we select month, the KPI calculations are performed for previous month, and similarly for date part as well.

 

I want to set up the same functionality using DAX but I don't fully understand the concepts yet. I have done some research and found a few half baked solutions but nothing elegant so far. If someone can please give me some pointers that would be great.

 

Thank you

1 REPLY 1
v-yuezhe-msft
Employee
Employee

@sohi429,

You can use DAX Time Intelligence Functions . And there is an example for your reference in the attached PBIX file. If you still have questions about the DAX, please share sample data of your table and post expected result here.

https://msdn.microsoft.com/query-bi/dax/time-intelligence-functions-dax


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.