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
Greg_Deckler
8 years agoCommunity Champion
What if it looked like this for ID 1?
| Based on ID & Offer | ||||||||||
| ID | Offer | Received Letter | Received Email | Received Phone Call | Letter Only | Email Only | Phone Call Only | Letter & Phone Call | Letter & Email | Email & Phone Call |
| 1 | 20% off | Y | N | Y | N | N | N | Y | N | N |
- Anonymous8 years agoNot applicable
Hi,
that would be perfect. Any suggestions would be much appreciated.
Thanks
- Greg_Deckler8 years agoCommunity Champion
You should be able to create measures like this:
Email Only = VAR tmpTable = SUMMARIZE(Table8,[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")
- Anonymous8 years agoNot applicable
Thanks very much for this Greg! I have one quick question regarding the last piece
RETURN IF(RL="Y" && RE="N" && RP="N","Y","N")
Does there always have to be 3 outcomes at the end (N,Y,N)? Or can this simply be N?