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

Get Previous Row Value and multiple by current row value

Hi Expert

 

Is this possible in power bi to get the previous row value and multiple the result by the current value in a another row. I have reserched online and there are a few options availble but they do not give the correct results after the first instant J7 is correct data points their after are incorrect in Power BI. 

 

THis is what i found on line https://community.powerbi.com/t5/Desktop/How-to-refer-to-the-previous-row/td-p/529060

 

The image below is the power bi output which agrees with J7 in the excel image below. All other data points are wrong when compairing to excel.


Capture.PNG

 

 

 

 

 

 

 

 

The image below is an excel output.

Canadapvalue.PNG

 

2 REPLIES 2
Anonymous
Not applicable

What is the DAX you're using and what is "previous" for you? The Rank?

You're however using a recursive formula (as J8 refers to J7 which refers to J6 etc. SO to calculate J(n) you have to know all the way down to J(0)), which AFAIK does not work in PowerBI. While Excel calculate rows from top to bottom, there is no concept of "row order" in PBI. 
But can you show you rmodel and DAX?


Anonymous
Not applicable

Sample File (ref to column Se_1)

https://www.dropbox.com/s/m42g4igb0di7juu/productx.pbix?dl=0

 

My DAX for the previous value is test case only - are in column Calculated_Column and Previous value 1 (columns)

the desireed out are the excel numebrs...

 

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.