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

Announcements
Save an extra $150 Dec 1–7 with code CYBERWEEK - stackable with early bird savings: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
brindlogcool
Creator III
Creator III

Variable

Hi ,

Is it possible to use the variable in the if condition like this

=If (Value='$(vName)', Result)

11 Replies
brindlogcool
Creator III
Creator III
Author

Hi DV,

Thanks for all your response.Sorry if i have not provided  the clear details. Consider your example you  have given vTest as Jan , so the object TX10 should have sales output related to Jan. but it is displaying all the sales data. that is the problem. I want to show only Jan related data in TX10.Please let me know if still you need more clarity .

IAMDV
Master II
Master II

Hi Again,

Now I understand what you mean (hopefully!). In my example, if you wanted to see all the Sales values for vTest variable then you need to use Concat function with Set Expression. However in your dataset if you have one-one relationship between the two fields then you can use ONLY function or any aggregation function.

Concat({<Months = {$(vTest)}>} Sales, ', ')

or

ONLY({<Months = {$(vTest)}>} Sales)

I'm attaching the updated QVW file. I hope this helps!

Cheers - DV

http://qlikshare.com