Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I have data like this:
Months | Supply | BOH | Demand | EOH |
1 | 50 | 100.00 | 50.00 | 100.00 |
2 | 60 | |||
3 | 70 | |||
4 | 80 | |||
5 | 90 | |||
6 | 100 | |||
7 | 110 | |||
8 | 120 | |||
9 | 130 | |||
10 | 140 | |||
11 | 150 | |||
12 | 160 |
And I want it make it like: (using Measure in Power BI):
Months | Supply | BOH | Demand | EOH |
1 | 50 | 100.00 | 50.00 | 100.00 |
2 | 60 | 100.00 | 50.00 | 110.00 |
3 | 70 | 110.00 | 55.00 | 125.00 |
4 | 80 | 125.00 | 62.50 | 142.50 |
5 | 90 | 142.50 | 71.25 | 161.25 |
6 | 100 | 161.25 | 80.63 | 180.63 |
7 | 110 | 180.63 | 90.31 | 200.31 |
8 | 120 | 200.31 | 100.16 | 220.16 |
9 | 130 | 220.16 | 110.08 | 240.08 |
10 | 140 | 240.08 | 120.04 | 260.04 |
11 | 150 | 260.04 | 130.02 | 280.02 |
12 | 160 | 280.02 | 140.01 | 300.01 |
Where BOH= EOH of previous month,
Demand=BOH/2
EOH= Supply+ BOH- Demand
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
126 | |
78 | |
78 | |
59 | |
51 |
User | Count |
---|---|
165 | |
83 | |
68 | |
68 | |
59 |