Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
bvendeza
Contributor II
Contributor II

Can you total variables?

I have a an excel file containing all my KPIs, and in there, I have a fixed variable labeled $(vOrderCount) that corresponds to a particular expression:

=NUM(COUNT(OrdersMade),$(vNumberFormat)

I need to create a new expression that utilizes this variable, however, I need the total of it. Naturally, it would have to be 

=NUM(COUNT(TOTAL(OrdersMade)),$(vNumberFormat)

but with the original expression already linked to so many things in my application, I was just wondering if it was possible to do a total on variables like these? I've tried adding SUM and TOTAL before the variable label in the expression, (example: =SUM(TOTAL($(vOrderCount)) and it just doesn't work. The sample given above is fairly simple; The original expression is longer and contains a particular logic within it, but is it not working because the expression in the excel file already contains a NUM in it, or am I missing something else, logic-wise? 

 

Thank you.

Labels (1)
1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The TOTAL needs to be injected into the "COUNT(OrdersMade)".  You cannot do TOTAL after the count has already been calculated.  I think your only choice here is to either create multiple variables, or to use variables with parameters.

-Rob