Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable issue

I have an issue with Variables

The following is the code to create and populate the variable in the Qlikview Editor

LET vFinanceYearPeriod = peek('MinFY');

My issue is that I must use another variable in the "Settings" - "Variables Overview" menu to calculate a Total figure to use in charts and gauges. This new variable call ThisMonthsInvoices will use the previously defined variable vFinanceYearPeriod above as part of its calculation

sum(if(FinanceYearPeriod = $(vFinanceYearPeriod),GBPAmountInvoice);

when I use the new variable in my charts I get the value 0.

In order to prove my sanity I created a temporary table to ensure that there is a matching value in the original table using the code below and it pulls the expected data.

Temp:

SELECT CustomerType,
GBPAmountInvoice,
resident Transactions

WHERE FinanceYearPeriod = $(vFinanceYearPeriod);

As you can see the selection in side the variables if statement is the same as the selection on the load statement for my temporary table but the table load will find the required values whereas the calculation insode the variable will nor find anything.

I would be grateful if anyone could let me know what I am doing wrong ? I am new to qlikview.

1 Reply
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Not sure if it's related, but you are missing a closing paren at the end of your formula...