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

Need help in pulling data by using varaible as a filter in the where condition

Hi,

To dynamically change the year on the dashboard with the file drop, I'm using start year and end year from a stand alone table.

I created 2 variables to store start year and end year and am trying to use these 2 variables in all the places.

I have a bar chart which displays 3 years spend and 1 (current) year outlook

when I'm trying to pull outlook data for current year using vEndYear variable which holds 2016 as its value, the outlook bar is being disappeared along with -40% (yoy%).

When I hardcode it to 2016 and pull the data it is working perfectly fine.

Concatenate(LinkedTable)
Load
[FY OUTLOOK YEAR] &' Outlook' as Year
,
[Outlook_Parent_Firm_Name]  as PARENT_FIRM_NAME
,
[PLANNED_OUTLOOK_AMOUNT] as OUTLOOK_SPEND
Resident OutlookTable
where [FY OUTLOOK YEAR] = 2016; //'$(vEndYear)'; 

Attached is the QVW file, can someone please help me fix this asap.

Thanks!

5 Replies
Anonymous
Not applicable
Author

Can someone please help me with this....

sunny_talwar

vEndYear is a expression.... you cannot use a variable which has expression in the backend of the script. If you are using a selection from front end to do this, then I would suggest using trigger to save the value of selection as a hard-coded value

Capture.PNG

The above should read 2016, instead of =DASHBOARD_END_YEAR

Anonymous
Not applicable
Author

Thanks for your reply sunny!

How do I use this DASHBOARD_END_YEAR to filter the data in the edit script?

Please help me with this. Thanks!

sunny_talwar

My response above

Capture.PNG

Anonymous
Not applicable
Author

Thanks Sunny.

I used Fieldvalue() while declaring the variable n it worked.