Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi All,
We have a scenario where we need to loop the calculation in same column. Following is the sample data:
A | B | C | |
1 | 2 | 3 | |
5 | 6 | 2 | Result |
9 | 3 | 8 | Result |
1 | 3 | 6 | Result |
4 | 5 | 5 | Result |
The column C will have only first row filled and here its 3.
The below rows for column C is as follows:
Value of Previour row in Column C +Current row of Column A - Current row of Column B
ie to get 2nd row = 3+5-6 = 2
to get 3rd row = 2+9-3 = 8
to get 4th row =8+1 -3 =6
to get 5th row = 6+4-5 = 5
Kindly advice me to crack this.
Thanks in advance.
Solved! Go to Solution.
Hi its tricky and here are the results:
We have to split into 3 measures:
m1 : get that 3 in all rows in a column
m2: get a column with column A minus B where sheet C has blank
m3: now add m1 +m2 You get the results as desired.
m1 m2 m3
3 3
3 -1 2
3 5 8
3 3 6
lookupvalue use index-1 to get pervious row
It doesnt work brother. If works update the dax. Let us know
Hi its tricky and here are the results:
We have to split into 3 measures:
m1 : get that 3 in all rows in a column
m2: get a column with column A minus B where sheet C has blank
m3: now add m1 +m2 You get the results as desired.
m1 m2 m3
3 3
3 -1 2
3 5 8
3 3 6
Really appreciate if you can guide us with measure
you will need an index column , use that to find the previous row.
I did that. Was able to bring 3 in second row. But how to handle for remaining rows.There we get blanks
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |