Forum Discussion

gianmarco's avatar
gianmarco
Helper IV
2 years ago
Solved

IF condition + WHERE

Dear All, i have the following table: Fruit City Preferred Banana NY 0 Kiwi null null Apple Rome 1 Orange null null Grape Philly 0   I need to create a conditiona...
  • ChiragGarg2512's avatar
    2 years ago

    gianmarco , If this is the data then this column formula should work:

    Column =
    var _v = CALCULATE(Max(q1[City]), FILTER(q1, q1[Preferred] = 1))
    return
    IF(q1[City] = "null", _v, q1[City])
     
    Thank You.