Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi there,
ı have a table like that :
ID | YEAR_MONTH | category | money |
3969385 | 201502 | car | 1.206 |
3969385 | 201506 | bus | 2.455 |
28289815 | 201502 | x | 610 |
22291674 | 201506 | car | 1.224 |
23481102 | 201506 | t | 563 |
10126853 | 201508 | bus | 445 |
360150 | 201503 | r | 1.231 |
1631437 | 201511 | w | 523 |
ı want to filter ID s like that :
Display ONLY the ID that includes BOTH category = "car" and "bus"
( here the answer is ID='3969385' that is the one includes both, there are other ID that only inclues one of them that is useless for us)
Anyone can help? thank you.
lol sure...
Sum({<ID = {"=Count(DISTINCT {<category = {'car', 'bus'}>} category) = 2"}>} money)
thank you my friend, that worked like a charm.
but here the case I want is to FILTER them also. I want to show only the ID s that has this condition on table.
Filter the ids in the script?
yes filter them in table.(not in script) just display the ones on that condition
In a single table or limited multiple table? or throughout the dashboard?
Sunny thanks again. But what if I need another case like:
Display ONLY the ID that includes BOTH category = "car" and "bus"
AND
YEAR_MONTH of the BUS is greater than the YEAR_MONTH of the CAR
Where are you looking to get this? Would you be able to share a sample and explain where you are looking to get this?
the same situation, my aim is to filter the data on that conditions.
hi there,
ı have a table like that :
ID | YEAR_MONTH | category | money |
3969385 | 201502 | car | 1.206 |
3969385 | 201506 | bus | 2.455 |
28289815 | 201502 | x | 610 |
22291674 | 201506 | car | 1.224 |
23481102 | 201506 | t | 563 |
10126853 | 201508 | bus | 445 |
360150 | 201503 | r | 1.231 |
1631437 | 201511 | w | 523 |
Display ONLY the ID that includes BOTH category = "car" and "bus"
AND
YEAR_MONTH of the BUS is greater than the YEAR_MONTH of the CAR
But where exactly are you looking to see this info? In a chart or throughout your dashboard or just filter out in the script... I am a little confused
in a chart (table) by expression