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

Using variables in a straight table

I have 2 questions in the attached simple qvw, question 2 being more important. I basically need to have several input items for the users to dynamically change, which then affect the expressions in my straight chart for the applicable dimension value.  Ideally I'd love to have everything in the load script but so far this is the only way I've thought of to accomplish the chart you see in this qvw.  What I can't seem to figure out is how can I get a column totals for expressions built from other expressions without creating massively long code in an expression (as would be the case in my  real app).    Any suggestions are appreciated, thanks.

1 Solution

Accepted Solutions
kdmarkee
Specialist
Specialist
Author

I need column totals not row totals. I meant to attach an updated qvw and forgot, so I've done that here...this should help explain it.  I did get help from another discussion on this that got me a little farther. I was able to use sum(aggr()) for all the expressions, and then use the column label names in later expressions with the Total Mode property of the expression set to Sum of Rows, and that gave me totals within the chart.

View solution in original post

2 Replies
petter
Partner - Champion III
Partner - Champion III

You can simply refer to the columns in the straight table by their labels and do calculations on them.

2018-05-28 10_08_20-QlikView x64 - Evaluation Copy - [C__Users_pts_Downloads_variables in straight c.png

kdmarkee
Specialist
Specialist
Author

I need column totals not row totals. I meant to attach an updated qvw and forgot, so I've done that here...this should help explain it.  I did get help from another discussion on this that got me a little farther. I was able to use sum(aggr()) for all the expressions, and then use the column label names in later expressions with the Total Mode property of the expression set to Sum of Rows, and that gave me totals within the chart.