Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using total value within an expression

Hi everyone,

I am wondering, I have the following expression:

sum({<ORDER_TYPE = {'ORDER'}, DOCUMENT = {'BILL'}>} sales)

Now we set filters to a single brand and a single salesperson to generate reports for them. Problem is, in the expression above I want all those setting to be for the correct filters, except I want this expression to show all salespersons. I can't deselect the salesperson, since we have more reports.

I was thinking in the order of: sum({<ORDER_TYPE = {'ORDER'}, DOCUMENT = {'BILL'}, SALESPERSON = {1} >} sales)

But this obviously doesn't work. If we use sum({<ORDER_TYPE = {'ORDER'}, DOCUMENT = {'BILL'}, SALESPERSON = {*} >} sales) I still find problems, since it shows only the articles sold for the selected salesperson, not all in total.


Who can help?

10 Replies
Not applicable
Author

hi maartena

can you share your file?

Not applicable
Author

Unfortunately not. But the expression isn't rocket science . Do you have any ideas?

Not applicable
Author

Hi,

You can try this expression.

sum({<ORDER_TYPE = {'ORDER'}, DOCUMENT = {'BILL'}, SALESPERSON =  >} sales)

anbu1984
Master III
Master III

To ignore selected salesperson, try this

sum({<ORDER_TYPE = {'ORDER'}, DOCUMENT = {'BILL'}, SALESPERSON =  >} sales)

Not applicable
Author

hii

try this expression

Sum({<order_type={'order'},document={'bill'},salesperson= >}sale)

sunny_talwar

Worth giving a shot:


=Sum({<ORDER_TYPE = {'ORDER'}, DOCUMENT = {'BILL'}, SALESPERSON = p(SALESPERSON) >} sales)


Best,

Sunny

avinashelite

try like this

sum({<ORDER_TYPE = {'ORDER'}, DOCUMENT = {'BILL'}, SALESPERSON =  >} sales)

Not applicable
Author

Thanks for all the 5 answers, but they don't do anything else then the one I already posted....

sunny_talwar

Maarten what exactly are you trying to achieve? You mentioned getting the total? would you be able to put some sample data down with your expected result? I think you need some kind of TOTAL if you are looking to get a total here or you also might have to consider alternate state depending on your chart's dimension (if it is SALESPERSON).

Without some sample input and output, this would be difficult to troubleshoot.

HTH

Best,

Sunny