Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts,
I do have four variables which I created in UI based on complex logic, now I need to get unique count of unique values of the combined data values in variables, can you please help.
example sample data,consider below four variables A,B,C,D which i created in UI having below values, how do i get unqiue count which is 9.
Please help.
A | B | C | D |
A1 | A1 | B1 | C1 |
A2 | B1 | C1 | D1 |
A3 | B2 | C2 | D2 |
Can you post a qlikview document that demonstrates the problem?
Hi Gysbert,please see below example
Company | Product Id | Business date | Grade 1 | Grade 2 | Grade 3 |
Microsoft | A123 | 6/29/2015 | 10 | 10 | 10 |
Microsoft | A123 | 6/28/2015 | 9 | 9 | 10 |
Microsoft | A456 | 6/29/2015 | 10 | 10 | 10 |
Microsoft | A456 | 6/28/2015 | 10 | 10 | 11 |
Microsoft | A789 | 6/29/2015 | 13 | 12 | 12 |
Microsoft | A789 | 6/29/2015 | 12 | 12 | 12 |
Duke | B123 | 6/28/2015 | 9 | 12 | 13 |
Duke | B123 | 6/29/2015 | 9 | 12 | 14 |
Edison | B456 | 6/28/2015 | 11 | 13 | 13 |
Edison | B789 | 6/29/2015 | 9 | 9 | 12 |
Edison | B789 | 6/28/2015 | 10 | 10 | 9 |
logic for upgrades: if difference of previous grade-current grade>0, then upgrade
logic for downgrades: if difference of previous grade-current grade<0, then downgrade
as you can see in above example prod A123 of microsoft has been upgraded in both grade 1 and grade 2 and in grade 3 its unchanged,
so, if the product has been upgraded in at least one of grades it should count as only 1 upgrade, so in total Microsoft has two upgraded products A123(in grade 1 and grade2) and A 789, hence count is 2 and for Duke product has been downgraded in grade 3.
so, I created separate variables for each grade to get Product id for Product Upgrades and downgrades, now i need o/p table as below o/p table should be
Company | Total Upgrades | Total Downgrades |
Microsoft | 2 | 1 |
Duke | 0 | 1 |
Edison | 1 | 1 |
since I created variables for each Grade, i need to show unique product ids for upgrades and downgrades for each company. any ideas. please help.