Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Not applicable

Ignore all selections but one

Hey there,

i have a chart that show's the total payments made for a project. What i want is the chart to do a sum on all the fields with that project_id ignoring all the selections but the project_id.

Atm im trying using set analisys but im not that good with it yet.

Any help would be appreciated.

Regards,

Juan Pedro

10 Replies
MVP & Luminary
MVP & Luminary

Re: Ignore all selections but one

You need to add the dimensions  that should be ignored to the expression like this:

sum(<Field1=,Field2=, .... >  total_payments)


talk is cheap, supply exceeds demand
Not applicable

Re: Ignore all selections but one

Hey there and thank you for the answer,

ye i knew this kind of approch but like i dont want to insert all my possibles dimensions in the expression.

I was wondering if something like consider only this kind of selection was possible.

Regards,

Juan Pedro

MVP & Luminary
MVP & Luminary

Re: Ignore all selections but one

I think sum({1<FieldX=p()>} total_payments) is a close as you can get.


talk is cheap, supply exceeds demand
MVP
MVP

Re: Ignore all selections but one

I remember some method to dynamically get all fields to clear, like described here (at the bottom of the post):

http://community.qlik.com/docs/DOC-1334

MVP
MVP

Re: Ignore all selections but one

swuehl wrote:

I remember some method to dynamically get all fields to clear, like described here (at the bottom of the post):

http://community.qlik.com/docs/DOC-1334

That's how I do it.  It can be difficult getting the syntax right unless you know exactly what you're doing and why (or cut and paste from an example), but it does the trick while still being a fairly compact expression.

Not applicable

Re: Ignore all selections but one

Hey there,

this one was just perfect for my purpose.

Thanks everyone and have a nice day.

Juan Pedro

Not applicable

Re: Ignore all selections but one

Hey there im usign the method described at the bottom of that post (very usefull btw).

sum({$<[$(=Concat({1<$Field-={'PROJECT'}>}distinct $Field,']=,[')&']=')>} PAYMENT_AMOUNT)

as long as this is the expression everything is working fine. The only problem is that i need to do an aggregation on the sum since i have invoices that has been paid in a rateal way or similar.

sum(AGGR({$<[$(=Concat({1<$Field-={'PROJECT'}>}distinct $Field,']=,[')&']=')>} PAYMENT_AMOUNT, INVOICE_PAYMENT_ID))

Now when i add the aggregation function the chart is not working properly anymore since is considering the low level selections aswell.

Any ideas?

Regards,

Juan Pedro

MVP & Luminary
MVP & Luminary

Re: Ignore all selections but one

Try the aggr on the outside of the sum


talk is cheap, supply exceeds demand
Not applicable

Re: Ignore all selections but one

Already did it. Not working properly the returned amount is not the right one 😕