Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
alexpanjhc
Valued Contributor

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
ecolomer
Honored Contributor II

Re: contional expression

just erase first sign =

alexpanjhc
Valued Contributor

Re: contional expression

thanks for the reply, but it did not work.

shawn-qv
Contributor

Re: conditional expression

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.

alexpanjhc
Valued Contributor

Re: conditional expression

Shawn

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

jsaradhi
Valued Contributor

Re: conditional expression

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.

alexpanjhc
Valued Contributor

Re: conditional expression

It is BOOKED becasue I used it somewhere else too.

jsaradhi
Valued Contributor

Re: conditional expression

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.

alexpanjhc
Valued Contributor

Re: conditional expression

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...

shawn-qv
Contributor

Re: conditional expression

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.