Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Match Rate in Bar chart

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:

  

            IDCategorySourcedestStatus
1Cat1AAMatch
2Cat2Bbnot match
3Cat1Aanot match
4Cat1CCCCMatch
5Cat3dDnot 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

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Try

count(if(Source=dest,Category))/count(Category)

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Try

count(if(Source=dest,Category))/count(Category)

mjtaft2017
Partner - Creator
Partner - Creator

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

];

Capture.PNG

pathiqvd
Creator III
Creator III

Hi,

Try like this,

count({$<Source= p(dest)>}[Category]) / count([Category])

Regards,

Not applicable
Author

It works! Thanks Micheal!