Forum Discussion

JoshEnglish's avatar
JoshEnglish
Icon for Helper I rankHelper I
8 years ago
Solved

Conditionally checking if a value from one column matches in another column

I have a table with data formatted like this  I need to create the ShouldSkip column using the following logic:   ShouldSkip should be TRUE only when isPartial on that line is True AND the v...
  • Greg_Deckler's avatar
    8 years ago
    Column = IF([isPartial] 
    && CALCULATE(COUNTROWS(aShouldSkip),
    FILTER(aShouldSkip,aShouldSkip[Agent]=EARLIER(aShouldSkip[Agent])
    && aShouldSkip[Account]=EARLIER(aShouldSkip[Primary]))) >= 1,
    TRUE()
    ,FALSE()
    )

    aShouldSkip is my table name. Don't feel bad, took me a while to wrap my head around EARLIER until I finally realized it was just a way of saying "current value".