Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
jessica_webb
Creator III
Creator III

Using an expression inside another expression.

Hi, hoping someone might be able to come up with a solution to what may well be a very simple problem that I'm having...

I have created an expression for my straight table, which gives me a percentage of respondents within an area giving a particular response. The expression is:

Count (DISTINCT{1<Year={'2014'}, Type={1}, Response={1}>} RespondentID)

/ Count (DISTINCT{1<[Academic Year]={'2014'}, Type={1}>} RespodentID)

In the straight table, this is split by a 'Location' dimension, so that for each location I get my percentage.

I now want to create a 100% stacked bar chart with two sections - locations where over 80% of respondents gave that response; locations where under 80% of respondents gave that response.

So far, I have created a new variable called 'vRES1' with my original expression as the definition.

I have then tried to use that variable within an expression for my stacked bar chart, to no avail! I have:

Count (DISTINCT{<IF($(vRES1)>=0.80)> Location) /

Count (DISTINCT {<$(vRES1)={'>=0'}>} Location)

Qlikview is happy with the expression, but I get no data in my stacked bar chart!

Any help or suggestions gratefully received!


Many thanks.

14 Replies
sunny_talwar

Hey Jessica,

The application you shared had Year as dimension for the stacked bar chart. That is why the stacked bar chart I made had several bar, one each for every year. Do you not want to see year as the dimension?

Best,

S

jessica_webb
Creator III
Creator III
Author

Sorry for the confusion. I'm having this problem with another stacked bar chart I'm doing and haven't found a solution yet!

I want year as a dimension (so one bar per year), but I want each bar split by +/- 80% as outlined above.

Thanks,
J

sunny_talwar

See if this makes sense. Its showing % of locations that have above 80% response rate and stacked on top of it is the % of locations that have below 80% response rate. The sum of the two bars is 100%.

Let me know what you think.

Best,

S

jessica_webb
Creator III
Creator III
Author

Absolutely fantastic! Thank you so much for your help - exactly what I was looking for!


Very best wishes,

Jessica

sunny_talwar

I am glad that I proved helpful.

Best,

S