Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
alexpanjhc
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
ecolomer
Master II
Master II

just erase first sign =

alexpanjhc
Specialist
Specialist
Author

thanks for the reply, but it did not work.

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

alexpanjhc
Specialist
Specialist
Author

Shawn

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

Anonymous
Not applicable

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
Specialist
Specialist
Author

It is BOOKED becasue I used it somewhere else too.

Anonymous
Not applicable

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
Specialist
Specialist
Author

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