Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.