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.
Hi,
Here is what I'm trying to archive. This is simular to one of my previous comment.
I know that I alway at least have one [Col2] which is "true". (It is not necesary the first line)
In this situation I would like to set [Col6] equal to [Col3]
Otherwise I would like calculate [Col6] by finding the [Col6] value from the privious or next row where [Col1] is matching my current row [Col4]. THIS IS THE ESSENTIAL PART
and then add the value from [Col5]
Col1 Col2 Col3 Col4 Col5 Col6
Row1 1 true 1 null null Row2 2 false 0 1 3 Row3 3 false 0 2 7
Col6 = if [Col2] = true then [Col3] else "take value from previous or next row [Col6] where [Col1] = [Col4] and add [Col5]"
Col1 Col2 Col3 Col4 Col5 Col6 Row1 1 true 1 null null 1 Row2 2 false 0 1 3 4 Row3 3 false 0 2 7 11
Please help.
Solved! Go to Solution.
Hi @eacy
In DAX, we can compare values in previous row by adding [index] column in table and filter table context with this column. But even based on this comparison, it’s still not possible to achieve this kind of “self recursion” to generate values in current column.
Best Regards,
Angelia
Hi @eacy
In DAX, we can compare values in previous row by adding [index] column in table and filter table context with this column. But even based on this comparison, it’s still not possible to achieve this kind of “self recursion” to generate values in current column.
Best Regards,
Angelia
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 |
---|---|
114 | |
100 | |
78 | |
75 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |