Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
Date | Speed | Partner | Quantity |
---|---|---|---|
20-05-2016 | 5000rpm | ABC | 100 |
20-05-2016 | 7200rpm | XYZ | 100 |
20-05-2016 | 7200rpm | ABC | 200 |
20-05-2016 | 5000rpm | XYZ | 200 |
20-05-2016 | 5000rpm | PQR | 300 |
21-05-2016 | 18000rpm | ABC | 300 |
21-05-2016 | 5000rpm | PQR | 400 |
21-05-2016 | 7200rpm | ABC | 500 |
21-05-2016 | 7200rpm | PQR | 500 |
I need to find which speed is sold by all the partners whose Quantity is greater than zero on the same data.
From the above example answer is 5000rpm.
Any solution for the above question?
Thanks
Piyush
5000rpm is sold by all the partners ABC,XYZ,PQR on same date (20-05-2016)
I need to use this as a filter..so cannot add dimension date
That's not the problem, you can select the Date, it will give you results. Just create the straight table as I have mentioned
May be modify your script like this:
Table:
LOAD Date,
Speed,
Partner,
Quantity,
AutoNumber(Date&'|'&Speed) as Key
FROM
[https://community.qlik.com/thread/217607]
(html, codepage is 1252, embedded labels, table is @1);
and then try this expression:
=Concat(DISTINCT {<Key= {"=Count(DISTINCT Partner) = Count(TOTAL DISTINCT Partner)"}>}Speed)
UPDATE: Sample attached
Hi Sunny,
I need to do it on UI. Because this i need to create as a filter and It is kind of dynamic based on some more filters.
Thanks,
Piyush
This is all front end my friend. We are just creating a field to make it more efficient. The other option would be using Aggr() which would be slower. Is slowness not a problem?
Can you please let me know using aggr() function?
Here you go:
=Concat(DISTINCT If(Aggr(Count(DISTINCT Partner) = Count(TOTAL DISTINCT Partner), Date, Speed), Speed))
Thanks Sunny.
Now need to add now some more conditions into this like sum(Quantity)>0 and rest all speed should go into 'Others' as a field.
Thanks,
Piyush