Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hallo zusammen,
ich beiße mir an einem Problem die Zähne aus.
Ich habe folgende Tabelle:
| Nutzer | Produktgruppe |
| 1 | A |
| 1 | C |
| 2 | A |
| 3 | A |
| 4 | A |
| 4 | B |
| 4 | C |
| 5 | A |
| 6 | A |
| 6 | B |
Ich möchte hieraus eine Dimension erstellen, die nur die Nutzer zeigt, die ausschließlich das Produkt A haben und kein anderes. Meine Schwierigkeit ist hier, dass alle Nutzer das Produkt A haben, aber eben nicht B und/oder C.
Als Ergebnis hätte ich hier die Nutzer 2, 3 und 5.
Wäre super wenn mir jemand auf die Sprünge helfen könnte.
Vielen Dank im voraus!
Viele Grüße
Matthias
Denkbar wäre etwas wie das hier:
aggr(if(count(Produktgruppe) = 1 and count({< Produktgruppe ={'A'}>} Produktgruppe), Nutzer), Nutzer)
- Marcus
Denkbar wäre etwas wie das hier:
aggr(if(count(Produktgruppe) = 1 and count({< Produktgruppe ={'A'}>} Produktgruppe), Nutzer), Nutzer)
- Marcus
One solution is.
tab1:
LOAD * INLINE [
Users, Product group
1, A
1, C.
2nd, A
3rd, A
4th, A
4th, B
4th, C.
5, A
6, A
6, B
];
Left Join(tab1)
LOAD Users, If(Concat(DISTINCT [Product group])='A', 'Y', 'N') As Flag
Resident tab1
Group By Users;
Output.
Sorry für meine späte Rückmeldung.
Die Formel hat funktioniert.
Danke!