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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Update Data in Power BI Based on Previous rows, using Measures

Hi,

I have data like this:

MonthsSupplyBOHDemandEOH
150100.0050.00100.00
260   
370   
480   
590   
6100   
7110   
8120   
9130   
10140   
11150   
12160   

And I want it make it like: (using Measure in Power BI):

 

MonthsSupplyBOHDemandEOH
150100.0050.00100.00
260100.0050.00110.00
370110.0055.00125.00
480125.0062.50142.50
590142.5071.25161.25
6100161.2580.63180.63
7110180.6390.31200.31
8120200.31100.16220.16
9130220.16110.08240.08
10140240.08120.04260.04
11150260.04130.02280.02
12160280.02140.01300.01

 

Where BOH= EOH of previous month,

Demand=BOH/2

EOH= Supply+ BOH- Demand

 

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

As your calculate logic, you will use the previous result in current row. This seems like iteration. I think Dax doesn't support us to calculate in iteration logic. I suggest you to achieve your goal by Power Query.

For reference:

List.Generate() and Looping in PowerQuery

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.