Skip to main content
Announcements
Announcing Qlik Talend® Cloud and Qlik Answers™ to accelerate AI adoption! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with expression in Listbox

Hi,

I am trying to get a listbox to show values depending on certain criteria in an expression. ie.

=if(FINISHED='Y',

          if(STATUS = 'SS' OR STATUS = 'WW' OR STATUS = 'IN',

                    if((fabs(CURRENT_INTERRUPTION_STARTDATE-'22/09/2010') <= 35 or fabs('22/09/2010'-CURRENT_EXIT_DATE) <= 35),

                                             'Withdrawn','Not Withdrawn')))

When I try select 'Withdrawn' or 'Not withdrawn' in the listbox(in red), nothing gets filtered in the application.

I think it's the Date criteria in the expression that is not correct. Although the logic seems to be fine.

Any ideas on how to correct this? I've attached the sample .qvw

Many thanks

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    I would suggest you to include this calculation while loading the data.

    As i can see from the table view you are using only 1 table. So the same expression will work for sure.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

6 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   When you try the same expression in chart it works.

   Can you describe how you want to use this. and whats the functional requirement, with example.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Yes, it seems to work just fine in the chart.

I basically want a listbox with Withdrawn and Not withdrawn, using the specified criteria.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    I would suggest you to include this calculation while loading the data.

    As i can see from the table view you are using only 1 table. So the same expression will work for sure.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
deepakk
Partner - Specialist III
Partner - Specialist III

Hi Beanz,

Try this out.

1) Create a new field  with (Current_Inspection_Date - '29/10/2010' ) as NewField 

2) Add the new field to the condition and remove Current_Inspection_Date - '29/10/2010'.

This might work.

Deepak

Not applicable
Author

Thanks, I'll try that out.

llauses243
Creator III
Creator III

Hi Beanz,

This is my offer ... pls see attach

Good luck, Luis