Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Experts,
I am new to Qlik world!
Trying to create a bar chart where it will show match rate (%) for each of categories.
Sample Data:
ID | Category | Source | dest | Status |
1 | Cat1 | A | A | Match |
2 | Cat2 | B | b | not match |
3 | Cat1 | A | a | not match |
4 | Cat1 | CC | CC | Match |
5 | Cat3 | d | D | not match |
Source and dest fields are coming from two different databases(both are Postgres in this case)
I tried to create chart by adding 'Category' as Dimension where each Category and its match rate is represented as bar.
I tried to create below measure but it doesn't show any results.
count({$ <Source= dest>}[Category])/count([Category])
Any suggestions?
Thanks,
Naveen
Try
count(if(Source=dest,Category))/count(Category)
If you want to only count the category once then try this
Count(Distinct{$<Status={"Match"}>}Category)/Count(Distinct Category)
Test2:
LOAD * INLINE [
ID, Category, Source, dest, Status
1, Cat1, A,A, Match
2, Cat2, B,b, not match
3, Cat1, A,a, not match
4, Cat1, CC, CC, Match
5, Cat3, d,D, not match
];
Hi,
Try like this,
count({$<Source= p(dest)>}[Category]) / count([Category])
Regards,
It works! Thanks Micheal!