Forum Discussion
cpmb
6 years agoFrequent Visitor
Conditional reference to another row in table
Could somebody explain why I am getting the numbers below in the Output column? I had expected to get those in the Desired Output column instead. DAX Formulas are below. Date Group ID Value O...
- 6 years ago
NewCol = IF ( Table1[Value] < 0, CALCULATE ( MAX ( Table1[Value] ), ALL ( Table1[ID], Table1[Value] ) ), Table1[Value] )Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers

AlB
6 years agoCommunity Champion
Hi cpmb
Can you explain how the correct numbers are calculated, what the logic is?
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers ![]()
- cpmb6 years agoFrequent Visitor
The logic is: if Value is negative, take the Value of another ID in the Group (ideally the max).
- AlB6 years agoCommunity Champion
NewCol = IF ( Table1[Value] < 0, CALCULATE ( MAX ( Table1[Value] ), ALL ( Table1[ID], Table1[Value] ) ), Table1[Value] )Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers
