Forum Discussion

afloyd2123's avatar
afloyd2123
Frequent Visitor
3 years ago
Solved

IF statement: use of binary flag

Hello,

Beginner here. I am trying to find the premium associated with column that is a binary flag (I used 1 and 0 rather than Y and N because it will be easier to make a measure with). 

I want to essentially do an IF statement where:

If the binary flag = 0 (the binary flag is a summation column currently), then show the annual premium (also a summation column). 

However, when I type: measure = IF(....

I can only enter a measure into the IF statement. Why is this? This seems like the easiest possible application of an IF statement but I cannot use either of the columns associated with this measure. Does this need to be a calculated column? If so, why?

 

Thanks for the help.

  • afloyd2123 If you reference a column from a measure you need to wrap it in an aggregation like MAX, MIN, SUM, AVERAGE, etc.

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    afloyd2123 If you reference a column from a measure you need to wrap it in an aggregation like MAX, MIN, SUM, AVERAGE, etc.