Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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
mov
Esteemed Contributor III

Re: Match Rate in Bar chart

Try

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

4 Replies
mov
Esteemed Contributor III

Re: Match Rate in Bar chart

Try

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

mjtaft2017
Contributor

Re: Match Rate in Bar chart

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
Contributor III

Re: Match Rate in Bar chart

Hi,

Try like this,

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

Regards,

Not applicable

Re: Match Rate in Bar chart

It works! Thanks Micheal!

Community Browser