Forum Discussion
Anonymous
8 years agoNot applicable
Flag based on value on multiple rows
Hi, I have a data set that contains a unique value for each customer as well as a column which indicates what offer they received as well as the method of communication (channel). For example; ...
- 8 years ago
Like this? See last row, a duplicate of the first row with a Y added to Email
Anonymous
8 years agoNot applicable
My apologies. This makes a lot of sense. I just got mixed up in all the Ys & Ns.
Is is possible to use this as a column or is it for a measure only?
Many thanks.
Greg_Deckler
Community Champion
8 years agoYou could use it as a column if you did something along these lines (below). I really think it works better as a measure though because you can just create a table visualization with [ID], [Offer], Last of Received Letter, Last of Received Email, Last of Received Phone Call and then your measures.
Email Only = VAR tmpTable8 = FILTER(ALL(Table8),[ID]=EARLIER([ID])) VAR tmpTable = SUMMARIZE(tmpTable8,[ID],[Offer],"RL",MAX([Received Letter]),"RE",MAX([Received Email]),"RP",MAX([Received Phone Call])) VAR RL = MAXX(tmpTable,[RL]) VAR RE = MAXX(tmpTable,[RE]) VAR RP = MAXX(tmpTable,[RP]) RETURN IF(RL="Y" && RE="N" && RP="N","Y","N")