How do I use the same column twice for filtering on a group of records?
23 April, 2014
Hi there,
I have a database table containing invoice items, each line representing each SKU purchased on an invoice. So, one invoice could be 10 rows in my table, each row with a different SKU code. I want to be able to count, for example, how many invoices contained SKU 'X' and SKU 'Y'. Or alternatively, how many invoices contained (SKU 'X' or SKU 'Y') AND contained SKU 'Z' as well.
Can you help?
Thanks,
Luke
I have a database table containing invoice items, each line representing each SKU purchased on an invoice. So, one invoice could be 10 rows in my table, each row with a different SKU code. I want to be able to count, for example, how many invoices contained SKU 'X' and SKU 'Y'. Or alternatively, how many invoices contained (SKU 'X' or SKU 'Y') AND contained SKU 'Z' as well.
Can you help?
Thanks,
Luke
Hi Luke,
you can drag a column more than once into the filter area in the Data screen:
and then you can change the filter operator according to the report requirements:
I hope that helps your report, if I have misunderstood what you are trying to do then please let me know.
regards,
Dave
you can drag a column more than once into the filter area in the Data screen:
and then you can change the filter operator according to the report requirements:
I hope that helps your report, if I have misunderstood what you are trying to do then please let me know.
regards,
Dave
Hi David,
Thanks for the response. I've actually found what I was looking for, which is the Append Sub Query functionality, which basically allows me to add the SKU Code column again to the end of each row and then I can do separate filters on the 2 different SKU Code columns which appear in my Master Query. Works fine! One small thing: I seem to have reached a limit whereby I cannot have more than 5 Append Sub Queries - is that an inbuilt limit (fyi, I'm using v6 of Yellowfin).
Thanks for your help,
Luke
Thanks for the response. I've actually found what I was looking for, which is the Append Sub Query functionality, which basically allows me to add the SKU Code column again to the end of each row and then I can do separate filters on the 2 different SKU Code columns which appear in my Master Query. Works fine! One small thing: I seem to have reached a limit whereby I cannot have more than 5 Append Sub Queries - is that an inbuilt limit (fyi, I'm using v6 of Yellowfin).
Thanks for your help,
Luke
Hi Luke,
I can see that I misunderstood your question! Good work you found what you needed anyway. Regarding a sub-query limit, I remember a while back that one or two clients reported a similar issue as you are experiencing, the limit varied for them, it was 5 for one of them if they were using IE, and a slightly higher number with Firefox. So we looked into it and made some fixes around mid last year. So I would say that you should definitely upgrade (YF 6.0 is out of support now, 6.2 is the oldest supported version at the moment) and that should fix the issue, and if you aren't able to upgrade right away you could try different browsers and maybe you'll get a couple of extra appends in.
regards,
Dave
I can see that I misunderstood your question! Good work you found what you needed anyway. Regarding a sub-query limit, I remember a while back that one or two clients reported a similar issue as you are experiencing, the limit varied for them, it was 5 for one of them if they were using IE, and a slightly higher number with Firefox. So we looked into it and made some fixes around mid last year. So I would say that you should definitely upgrade (YF 6.0 is out of support now, 6.2 is the oldest supported version at the moment) and that should fix the issue, and if you aren't able to upgrade right away you could try different browsers and maybe you'll get a couple of extra appends in.
regards,
Dave