Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show value if specific value in other column

Hey guys,

Small question concerning a pivot table.

I have got a pivot table with the following columns:

dimension "ordernumber" || dimension "article"

Basically, I need all the order numbers that contain the article "x".

So if the second column contains "x" it should show the ordernumber, AND all the other articles that were in this order.

If the order does not contain the value x, I do not want the see the order nor all its articles.

Why I am stuck, I cannot just use an expression with article = {'xtrans'} because it would then show me the article xtrans, but hide all the other articles in this order.. See my problem?

Thanks for the help!

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Is this what you want? PFA.

View solution in original post

13 Replies
tresesco
MVP
MVP

try something like:

Only({ordernumber=p({1<article={'x'}>})}article)

Edit: included '1' to disregard selection

Not applicable
Author

I do not understand the expression you have given me.

What does the "p" stand for? And the "1"?

tresesco
MVP
MVP

These are set analysis elements. Goto help and search for set analysis.

Not applicable
Author

Will do, but unfortunately it does not work..

It shows the p red underlinded..

Not applicable
Author

Think we had forgotten the $ sign. Adding this to the function the underlined p is OK now.

Other question though, I am supposed to pased this in the calculated dimension of "ordernumber" right?

Or where should I use this?

tresesco
MVP
MVP

Sorry, corrected expression :Only({<ordernumber=p({1<article={'x'}>})>}article). Try to use this as expression. If does not work, please share a sample app.

Not applicable
Author

The expression seems to be ok, but when I paste your function in the used dimension box, I get the "// error in calculated dimension"

I am now using

*the calculated dimension you told me, and

*the dimension "article"

Is that ok or am I using the function in the wrong place?

Thank you

tresesco
MVP
MVP

Request you to share the sample, that would minimize this loop, if you are worried about data security, please see this link

Not applicable
Author

Here is a file with my dimensions..

The funny thing is, it does give me a value for sales, but it does not want to show me the order numbers