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

How to refer to other values in a graph

Hi,

I'm awed by all the possibilities and all the help in the QlikSense forum. Hopefully I can contribute soon in answering some questions. For now, I've got one question.

I've setup a line graph in which I want to calculate another line based upon values from the first X-value. I'm nearly there, but it's not how I like it. The dimension is 'year'.

Situation:

I've got actual data per illness for 1 hospital per region and the complete data per regio for the year 2012. So I can show the marketshare for this hospital. I've also got predictions of the growth of the complete region (2020, 2030, 2040, etc.). 

What I would like to show is the marketshare (in 2012) times the prediction in 2020, 2030 en 2040. So as to get the expected amount of patients for this hospital.

What I've done is set up a measure, called Marketshare and then added it to my line graph:

IF(Year='2012',SUM(HospitalPatients)/Sum(RegionalPatients),Above(Marketshare))

This gives me a line with the same marketshare for all years (i don't want this line, but I don't know how to get the next line, without this step... )

So next I've included a measure, called HospitalPatients:

Sum(HospitalPatients)*MarketShare

This does the trick: I now have a line in my graph showing exactly what I need.

But I also see the line of Marketshare (a straight line, because it's always the same value, i.e. marketshare of 2012). I don't know if it's possible to 'not show' a line, but I guess I need to take on a different approach. Any suggestions?

I tried to use the formula instead:

Sum(HospitalPatients)*(SUM({$<Year={'2012'}>}Hospitalpatients)/SUM({$<Year={'2012'}>}Regionalpatients))

But it gives no results for the years 2020 etc.


Thanks in advance.

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Perhaps


Sum(HospitalPatients)*(SUM({$<Year={'2012'}>} TOTAL Hospitalpatients)/SUM({$<Year={'2012'}>}TOTAL Regionalpatients))


TOTAL will override the Year chart dimension

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Perhaps


Sum(HospitalPatients)*(SUM({$<Year={'2012'}>} TOTAL Hospitalpatients)/SUM({$<Year={'2012'}>}TOTAL Regionalpatients))


TOTAL will override the Year chart dimension

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

Thanks. It works!

Great.