Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Mastering Change Data Capture: Read Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter box to toggle between different sales amounts

I have something similar to the following data. What I need to is build a filter box which allows me toggle between the 'sum' of the 3 spend amounts listed. Hope that makes sense.

SALES_FIGURES :

LOAD

SALESMAN,

[SALES PRE TAX ],

[SALES POST TAX],

[SALES PRE COMMISSION],

DATE

FROM SALESDATA.XLSX

2 Replies
sunny_talwar

Create a inline table like this:

SaleSelection:

LOAD * Inline [

SaleSelection

SALES PRE TAX

SALES POST TAX

SALES PRE COMMISSION

];

Expression: Sum($(='[' & SaleSelection & ']'))

Make sure you have 'Always One Value Selected' in SaleSelection Selected.

HTH

Best,

Sunny

richnorris
Creator II
Creator II

There's a couple of ways I can intereperate what you're asking, so might need a bit more detail, but, I think what you want to do is in your backend create a seprate table,

SALESTYPES:

LOAD * INLINE [

    SalesType

    PreTax

    PostTax

    PreCommission

];

And then in your front end, create a selection box of 'SalesType'. Then create a text box with the following:

=Sum(if(SalesType = 'PreTax', [SALES PRE TAX], if(SalesType = 'PostTax', [SALES POST TAX], if(SalesType = 'PreCommission', [SALES PRE COMMISSION]))))