Forum Discussion
JoshEnglish
Helper I
8 years agoConditionally 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...
- 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".
JoshEnglish
Helper I
8 years agoThank you. I have to admit none of it makes sense. Some functions only seem to work in certain contexts. The tool tip for Earlier makes it sound like it does something completely different than what it does.
Greg_Deckler
Community Champion
8 years agoYou are correct on EARLIER, no doubt. EARLIER really only works in a table context, which typically means "not a measure" unless you are using something tricky like one of the "X" functions. And, I agree, the description of EARLIER is horrendous. But, if you think of it as "current value" you should be fine.