Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Select a child and get all children which belong to its parent

Hi all,

I want to select an article in a listbox.

In a pivot table I need to get all ticketnumbers in which this article is sold.

Furthermore I want to know the other articles which are sold with the selected one.

The ticketnumbers are the parents and the articles are the children

I have used an expression like this:

=sum({<TestArticleNumber=p({1<TestTicketNumber=p(TestTicketNumber) >}) >} TestAmount)

I don't get why it does not work...

I also added my project so you can take a look.

If you have any idea, please let me know!

Regards,

Kirsten

1 Solution

Accepted Solutions
Highlighted

May be try this

=Sum({<TestArticleNumber, TestTicketNumber=p(TestTicketNumber)>} TestAmount)

View solution in original post

8 Replies
Highlighted

May be try this

=Sum({<TestArticleNumber, TestTicketNumber=p(TestTicketNumber)>} TestAmount)

View solution in original post

Highlighted
Contributor III
Contributor III

Hi,

You can't put {1}. {1} omit current selection

Sum({<TestArticleNumber, TestTicketNumber = p(TestTicketNumber)>}TestAmount)

Regards

Highlighted

Where do you see {1} in my expression? I am confused jhoef-pv

Highlighted
Specialist
Specialist

Please try this -

=sum({<TestArticleNumber=p({$<TestTicketNumber=p(TestTicketNumber) >}) >} TestAmount)

Thanks.

Highlighted
Contributor III
Contributor III

Hi stalwar1

I sorry,

I see {1} in the expression kirsten_dc

sum({<TestArticleNumber=p({1<TestTicketNumber=p(TestTicketNumber) >}) >} TestAmount) 

In your expresion is very good.

Sum({<TestArticleNumber, TestTicketNumber = p(TestTicketNumber)>}TestAmount)



Highlighted
Partner
Partner

Thank you very much for your fast answer.

I don't get it...

This expression works partially for me. I tried this with another database, too but the result is not the expected one...

What is wrong?

Highlighted

There is a long list of TestTicketNumbers for TestArticleNumber = 135 which makes it difficult to verify if it is working or not... but just by eye-balling, it seems to be working.... why do you think it isn't working? Can you specify exactly what is wrong?

In general, the expression is just saying that ignore selection in TestArticleNumber and show all possible TestTicketNumber... so whatever you see in White in TestTicketNumber will be visible through the expression.

Highlighted
Partner
Partner

There were still too much TestTicketNumbers which did not include the selected TestArticleNumbers. But your assertion made me think about it again. In the script I built a new key out of the other columns used in the table - TestTierPath_ID, TestDate and TestTicketNumber. Instead of TestTicketNumber I used my new key in your expression. That works very well

Many thanks for your help!!!

Best Regards

Kirsten