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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

list box value in current selection

Hello everyone,

I have created one list box and current selection. If i select year value in list box that value is not displaying properly in current selection.

It is displaying no of days in that particular year. But I want to display as year value.

In script to get year value I used like this

if(year([DW Load])>=2014,[DW Load]) as listbox


in list box i used year(listbox)

Regards,

Kumar

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

Hi Kumar,

Can you try this and let me know if this works. I cant try at my end as I have to reload it to refresh the script.

dim_date:

Load DateOnly,

        Year(listbox) As Listbox;

load

Date(Floor([Time Full Date])) AS DateOnly,

if(year([Time Full Date])>=2014, [Time Full Date]) as listbox

Resident Dim_time;

V.

View solution in original post

10 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

That's because Year is not a field, but a result of an expression. When you click on a value you don't select a year, but all the values that were used to calculated the year value. You could try creating the listbox field as if(year([DW Load])>=2014,year([DW Load])) as listbox


talk is cheap, supply exceeds demand
vishsaggi
Champion III
Champion III

Hello Kumar,

I believe you have already raised this query before here current selection issue.

However, can you upload your sample app so that we can try on it quickly.

Thanks,
V.

Anonymous
Not applicable
Author

Even i tried that one also, but no use. Actually [DW Load] it is a timestamp.

Anonymous
Not applicable
Author

pfa

vishsaggi
Champion III
Champion III

Hi Kumar,

Can you try this and let me know if this works. I cant try at my end as I have to reload it to refresh the script.

dim_date:

Load DateOnly,

        Year(listbox) As Listbox;

load

Date(Floor([Time Full Date])) AS DateOnly,

if(year([Time Full Date])>=2014, [Time Full Date]) as listbox

Resident Dim_time;

V.

vishsaggi
Champion III
Champion III

Can i also know the specific reason of not using your [Time Year Number] as your Year Field and use this expression in listbox like

= If([Time Year Number]>= 2014, [Time Year Number])

Let me know.

V.

Anonymous
Not applicable
Author

That is so great. can you explain little how it is working now.

Anonymous
Not applicable
Author

Is there any way to display listbox name in current selection. Thanks for ur support. That is perfectly working

Regards,

Kumar

vishsaggi
Champion III
Champion III

Hello Kumar,

I quite did not get you, you mean the field used in the listbox to be displayed in Current selection or the title Current selection to be renamed to the field name.??

And would you mind tagging the response as correct so that other users will be helped.

Thanks,
V.