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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
StevePaulich
Contributor II
Contributor II

Problem with $ expression in Combo Chart

I'm having issue with $ variable in Combo Bar Chart aggregation. 

1st, I need to use Combo Chart.

X axis is FISCAL_YEAR_APR,

Left Y is SUM(APR_AMOUNT),

Right Y is SUM(COST_FINAL). 

I have defined a variable (vAPR) as APR. 

My specific problem is with the Stacked Bars I need for SUM(APR_AMOUNT). 

The expression I'm using is:  =sum({<  [APR]={'=$(vAPR)'} >} [APR_AMOUNT] ). 

Other versions of the expression have been tested but I've not figured it out.  I've attached a .qvd with my progress.   In this .qvd there are two years properly displaying because I specifically denoted the APR's in the expression using (example)  =sum({<  [APR]={'19-HLP-04'} >} [APR_AMOUNT] ).  How do I get my variable to generate the multiple stacks in the bar chart?  There's got to be a way! 

Thank you in advance.

SteveP

5 Replies
hopkinsc
Partner - Specialist III
Partner - Specialist III

Hi, 

What is the APR field and how is it used to make the calculation you require? 

If i select 2010, there are 8 possible APR values, can you break down the calculation needed ?

StevePaulich
Contributor II
Contributor II
Author

APR is our term for "project number".    What I need to see is the SUM of APR_AMOUNT for each APR in a stacked bar for the X axis "FISCAL_YEAR_APR".  So, in 2010, I'd need to see 8 different colored stacked sections totaling $937,837.  See the columns for 2018 and 2019 for examples.

StevePaulich
Contributor II
Contributor II
Author

I stopped entering expressions for each [APR] after completing 2018 & 2019.  It was killing to do that because I know there's got to be a better way of yielding the desired result.

hopkinsc
Partner - Specialist III
Partner - Specialist III

Hi, i have the attached working with a single expression, but as soon as you add the 2nd it breaks...

StevePaulich
Contributor II
Contributor II
Author

Thank you.  I think I'm going to redesign the dataset and see where that takes me.