Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I calculate ratio in charts


Hello Community

I am a freshman in using QlikView and try to show ratios in a bar chart.

I have a set of records of examinations in a radiology department an I want to show the ratio of outpatients to inpatient for different years.

Could anybody help me how I can calculate this ratio.

Thank you

Achim

13 Replies
Not applicable
Author

Hello Johan

Arrrgghh! I am going nuts.

Just tried to create a data sample that I can send you. How can I share the QV-file to you. The problem is that I still working with the personal edition (waiting for license of my company), so it might be difficult.  I actually don't know how to attach a QV-File or data set. But I just created a data sample with three columns (1: Examination-ID / 2: out/in / 3: year).

And with that data set I tried the same expressions that we have discussed above. And you won't believe it: IT WORKS!!! (see screenshot). Then I just copied the expression (works because I used the same column header) in my original QV and again I get back the value 1 (=100%) for each year. No idea why!!!

ratios_01.jpg

Regards

Achim

puttemans
Specialist
Specialist

Hello Achim,

Don't get discouraged. Within a few months, you'll probably be much further, and then this will just be a footnote in the learning process 🙂

When you write a reaction, you have in the upper right corner a link to 'use advanced editor'. If you click it, you can add attachments.

If that does not work, then make a picture of your script. 🙂

Regards,

johan

Not applicable
Author

Hello Johan

Thank you for encouraging me 🙂 And this finally helps. I just have built a new QV file with the same original data and created a new chart and I used the same expression! > It worked. You see the difference in the following screenshot (left side correct / right side incorrect) using the exactly same expression:

ratios_02.jpg

So that was the key when I was sure that it is no matter of the expression and I checked the properties. Before I tried nearly all properties of the expression, but I never had a look in the properties of the dimension. And somehow I put in the field [out/in] as a dimension (don't know why, because it makes no sense).

ratios_03.jpg

And that's it!!!

And you are totally right: This will be a keynote in the learning process (but a painful one for today) 🙂

So, thank you very much for your help and patience.

Best regards

Achim

puttemans
Specialist
Specialist

Hello Achim,

Thank you for the kind words. I'm glad I could help somehow. Good luck in your future qlikview work 🙂

Regards,

Johan