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
pritamchavan
New Member

Derive values for next rows based on earlier row

MicrosoftTeams-image.png

 

I am trying to add a values in a row which is based on previous row. The value should be replacing 0, based on the number of 0's and values in next and previous rows. 

Unable to derive new colum 'Updated Values' (mentioned in screen shot).

 

Need help!!

2 REPLIES 2
pritamchavan
New Member

Hi @pratyashasamal,

 

Thanks for the prompt response!

The running total is not helping since I have to derive & replace zero's using below logic.

IF the cell value is 0 then count number of 0's until you have a value greater than 0 for a group [Currency in my case].

 

The first 0 should be replaced by logic - 

  1. last value which is greater than 0 subtracted by the earlier row with value greater than 0
  2. Count the number of consecutive zeros
  3. Step 1 should be divided by Step 2
  4. New value derived to be added to earlier row

pritamchavan_0-1685342524211.png

 

Hope this should be able to handled.

 

pratyashasamal
Super User
Super User

Hi @pritamchavan ,
You can try to use Running Total .
You can refer to this blog :-
https://powerbidocs.com/2020/11/08/cumulative-total-running-total-in-power-bi/
Thanks ,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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.