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
mrothschild
Continued Contributor
Continued Contributor

Calculating % change from a matrix table

Link to PBIX file is: https://drive.google.com/file/d/1j_4CrUj0fPh0xK6hnO7OZ-uIWkoP5Kdg/view?usp=sharing

 

I'm trying to take the following Matrix output and calculate the natural log, or LN([value (t)]/[value (t-1)] ^ (1 / ([year (t) - [year (t-1)] for each given observation except for the first chronologically in a given row (because there is no (t-1) value).  You'll also note from the table that (t-1) isn't always available, in which case, I'd want (t-[most recent data point prior]) and the associated year. To complicate issues further, what's shown below is for a single model type.  But when the data is less sliced, the Values in the Matrix are unit-weighted (via a Measure), and so I'd like to keep that unit-weighting as part of the calculation base, rather than just using Values.

 

From that calculation, I want to calculate the average and standard deviation on a row-by-row basis of the output.  A screenshot of the desired output from Excel is shown below the Power BI Matrix screen shot.

 

Matrix Table 1.PNGMatrix Table 2.PNG

 

 

 

 

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @mrothschild,

It sounds like you are trying to recursion calculation to invoke the previous result of the current expression, right? If that is the case, you can use iterator functions to achieve cumulative calculation but power bi does not support recursion calculations.

Previous Value (“Recursion”) in DAX - Microsoft Power BI Community

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @mrothschild,

It sounds like you are trying to recursion calculation to invoke the previous result of the current expression, right? If that is the case, you can use iterator functions to achieve cumulative calculation but power bi does not support recursion calculations.

Previous Value (“Recursion”) in DAX - Microsoft Power BI Community

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help 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.