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.
Hello,
Imagine that I have the following values into a table.
Now if we take the first row in column F, the value is 4.5% then if we go in column c is less than 5.6% then F take the value of Column A, which is 2.8. For the second value into E, the value is 9.1. 9.1 is less than 11.1 (column c) so we take the value of Column A (previous row) which is 2.8%. The for the third value in E, which is 13.6%, this value is less than 16.7% in Column C, so we take the row before and the value in A is 2.8 . For the fourth value in column E which is 18.2%, this value is less than 22.2% in column C, then we take the value in column A (previous row) which is 1.5%.
So what's the best way to get the value of column F using those in column E, C and A?
A | B | C | D | E | F |
4.5% | 2.8% | ||||
9.1% | 2.8% | ||||
13.6% | 2.8% | ||||
18.2% | 1.5% | ||||
2.8% | 1.00 | 5.6% | 22.7% | 1.5% | |
2.8% | 2.00 | 11.1% | 27.3% | 1.5% | |
1.5% | 3.00 | 16.7% | 31.8% | 1.5% | |
1.5% | 4.00 | 22.2% | 36.4% | 1.5% | |
1.5% | 5.00 | 27.8% | 40.9% | 1.5% | |
1.5% | 6.00 | 33.3% | 45.5% | 0.8% | |
1.5% | 7.00 | 38.9% | 50.0% | 0.8% | |
0.8% | 8.00 | 44.4% | 54.5% | 0.8% | |
0.8% | 9.00 | 50.0% | 59.1% | 0.8% | |
0.8% | 10.00 | 55.6% | 63.6% | 0.8% | |
0.8% | 11.00 | 61.1% | 68.2% | 0.8% | |
0.8% | 12.00 | 66.7% | 72.7% | 0.2% | |
0.2% | 13.00 | 72.2% | 77.3% | 0.2% | |
0.2% | 14.00 | 77.8% | 81.8% | 0.2% | |
0.2% | 15.00 | 83.3% | 86.4% | 0.2% | |
0.2% | 16.00 | 88.9% | 90.9% | 0.2% | |
0.2% | 17.00 | 94.4% | 95.5% | 0.2% | |
0.2% | 18.00 | 100.0% | 100.0% | 0.2% |
Solved! Go to Solution.
@Anonymous
please try this
Column =
VAR num=MINX(FILTER('table','table'[C]>=EARLIER('table'[E])),'table'[B])
VAR result=maxx(FILTER('table','table'[B]=num-1),'table'[A])
VAR result2=maxx(FILTER('table','table'[B]=num),'table'[A])
return if(ISBLANK(result),result2,result)
Proud to be a Super User!
@Anonymous
Just want to make sure if there are any empty cells on the top of column A,B,C,D?
Proud to be a Super User!
Yes, there is empty cells on the top of A, B,C, D. Also, I don't see you solution. Did you forgot to add it
Regards,
@Anonymous
still trying to be clear about your calculation logic. what if column E is bigger than or equals to column C?
Proud to be a Super User!
Okay. If we look at values found in column E. Choose one randomly. Let's say 40.9%. If we consider only this value and look at those found in column C, we can say that 40.9% is bigger than 38.9% but less than 44.4%. So from that, we can say that the value in column A is 1.5% for 38.9% but 0.8% for 44.4%. So the value we are looking for in column A is 1.5%. So we will take this value and bring it to column F while the value in column E is 40.9%.
We repeat the same process for each value in column E and get the values for column F than we repeat those steps for each projectskey.
@Anonymous
please try this
Column =
VAR num=MINX(FILTER('table','table'[C]>=EARLIER('table'[E])),'table'[B])
VAR result=maxx(FILTER('table','table'[B]=num-1),'table'[A])
VAR result2=maxx(FILTER('table','table'[B]=num),'table'[A])
return if(ISBLANK(result),result2,result)
Proud to be a Super User!
Thank you so much for your help.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |