Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Eugene81
Contributor II
Contributor II

Select a string field in a table from a variable

Hello All,

I have a variable input (dropdown) with month (Vmonth) on a Qlik Sense Sheet

and i would like to filter string value field in a straight table with with this dropdown variable

How do you select a string field (ie Month Details) with another field in the same table which is linked to a variable(ie [Month name] = {$(Vmonth )} ?

Thank you very much in advance

 

 

Labels (1)
3 Replies
ajaykakkar93
Specialist III
Specialist III

Hi,
Add the set analysis in a measure to filter the value

{<[Month Field Name]={"$(Vmonth )"}>}

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting

Eugene81
Contributor II
Contributor II
Author

Hello,

Thank you very much for your answer, unfortunately it does not work.
I want the green field on top which is Vmonth to filter month-desc for may in the table (for the example)

{<[month]={"$(Vmonth )"}>} returns blank

Capture d’écran 2023-10-09 145549.png

ajaykakkar93
Specialist III
Specialist III

Hi
below is a example that i have shared please take a look at it it will help you for the same 

Hi,

Lets assume the field [Term Date] has below dates

[Term Date] 

01/12/2022
02/12/2022
03/12/2022
04/12/2022
05/12/2022
etc...

 


steps

  1. Create variables vMinDate with expression
    =date(min([Term Date] ))
  2. Create variables vMaxDate with expression
    =date(max([Term Date] ))
  3. Then in your measure add a set analysis
    =SUM({<[Term Date] = {">=$(vMinDate)<=$(vMaxDate)"}>}[Profit USD])

    Link:
    https://community.qlik.com/t5/New-to-Qlik-Sense/Filter-a-table-with-variables/m-p/2126606#M239060

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting