Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist
Specialist

conditional expression

Hi

I have a pivot table that I have dimensions like region,area, stores, sales, appr_book_flags

and then I have expressions like daily amount, daily dollars,MTD amount,MTD dollars,YTD amountand YTD dollars.

I want to show only when book_flags ='Booked' then show the 6 expressions, and then if it is pipeline, i only want to show YTD info and so on.

I think maybe I can try in the expression, conditional I just put my condition, but I do not think that helps.

Anyone knows the trick?

Thanks!

10 Replies
Highlighted
Master II
Master II

just erase first sign =

Highlighted
Specialist
Specialist

thanks for the reply, but it did not work.

Highlighted
Creator
Creator

Hi Alex,

If you want to conditionally show/hide the expressions (based explicitly when 'BOOKED' is the only possible value), then you can try something like:

  • =only(App_Book_Flag)='BOOKED'

If you want to conditionally show/hide the expressions if 'BOOKED' is one of many possible values in App_Book_Flag, then you can try:

  • =substringcount('|' & concat(App_Book_Flag, '|') & '|', '|BOOKED|')

If you choose to do this in the expression (and not use Conditional), then the 6 expressions will show at all times.

S.

Highlighted
Specialist
Specialist

Shawn

It still does not show even i had =only(App_Book_Flag)='BOOKED' 

Highlighted
Specialist
Specialist

you may have already considered this but check the case of the flag and the string (BOOKED)...BOOKED is not the same as Booked and similarly the flag itself.

create a listbox with for the field App_Book_Flag and paste a screenshot here.

Highlighted
Specialist
Specialist

It is BOOKED becasue I used it somewhere else too.

Highlighted
Specialist
Specialist

then what about your flag name? can you post screenshots? obviously something is not right otherwise it would work. it will be easier to troubleshoot your issue if you post screenshots or a sample qvw instead of us taking these shots in the dark at all the possibilities. we are trying to help you but you need to help us help you. click on use advanced editor on the top right hand side corner of the reply text box to attach files, etc.

Highlighted
Specialist
Specialist

Capture.PNG

I posted the field app_BOOK_FLAG  like i said I am using only =BOOKED and it still shows for all other status...

Highlighted
Creator
Creator

This will depend on how you've setup your Pivot/Straight table, and whether you have other expressions which may be causing them to show.

Also, bare in mind that QV is case-sensitive, so double check your expression/value, and any leading/trailing spaces ...

S.