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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis with Variable

Hi,

I have created a variable for date selection as below:

vPeriod = if(GetSelectedCount(Period) > 0 , GetFieldSelections(Period), '16/06/1980')
//if(GetSelectedCount(Period) > 0 , Concat(DISTINCT Chr(39) & Period & Chr(39), ', '), Chr(39) & '31/12/2003' & Chr(39))

And using the below expression

=Only({$<Draw={$(=Draw_EM)}, Period={">=$(=vPeriod)"}>} N1)

But when I select other selection then my Date variable does not work.

Can you please advise me related to this?

Kind regards,

Farrukh

1 Solution

Accepted Solutions
sunny_talwar

You can hide or you can select State as Auto Ascending

Capture.PNG

View solution in original post

13 Replies
Chanty4u
MVP
MVP

Y

period is greater than equal?

Anonymous
Not applicable
Author

Hi Chanty,

I have changed to this but still not luck.

=Only({$<Draw={$(=Draw_EM)}, Period={">=$(vPeriod)"}>} N47)

Farrukh

sunny_talwar

Not sure I understand?

Anonymous
Not applicable
Author

Hi Sunny,

Is the same issue as I had with Draw variable, Now I am selecting multiple fields (Draw & Period).

Example: Draw = EM+

And Period greater then (If date selected else default date for this I created a variable called vPeriod)

When I select Draw is working fine but when I select Draw and Period then Period is not returning the rows.

Please let me know if I explained properly. else I can share the sample qvw file.

Kind regards,

Farrukh

sunny_talwar

Please share the qvw sample and explain (meaning provide the exact numerical output) what you need based on few different set of selections

Anonymous
Not applicable
Author

Hi Sunny,

Please see the attached qvw file.

as you helped me with Draw Variable. Can you please advise me related to Period (Date Variable).

currently period variable is not working correctly if I add the selection (Draw).

Farrukh

sunny_talwar

31/12/2017 is grayed out when I select EM....

Capture.PNG

Anonymous
Not applicable
Author

Hi Sunny,

This is the problem, I do not know why this highlighted in grey. As you can see the below snapshot the data is available for 2017 and 2018.

I am not sure that is my date variable and expression is correct or not.

sunny_talwar

Some of the other days are available for selections... but 31/12/2017 is not

Capture.PNG