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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ferha_jafri
Partner - Creator III
Partner - Creator III

want to filter calculated value

Hello Everyone,

I have a scenario as per which i want to create a filter for sales such that its value get change for a  filter for sales amount >=10000 through an input box such that the straight table show the values when sales>=10000  otherwise it should show a complete table.

Thanks in advance

Ferha Jafri

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this.

     Sum({<Product = {"=if(not isnull($(Condition)),sum(Sales)<=$(Condition),'*')"}>}Sales)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

9 Replies
tresesco
MVP
MVP

May be something like this:

store input in a variable say, vInput. Now the calculation expression:

If(Sum(Sales)>=vInput,Sum(Sales))

Edit: missed last brace

Not applicable

Hi,

You can try like below.

Here SalesRange is Inputvariable

MonthDec is Dimension.

if(SalesRange >= 2000, if(Aggr(sum(Sales),MonthDec)> SalesRange, aggr(sum(Sales),MonthDec),Null()), Aggr(sum(Sales),MonthDec))

Andrea_Ghirardello

Hi,

try the attached example.

To see all products just leave the Condition variable empty. To see filtered rows, just write a formula like > 1500.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this Expression.

     Sum({<Product = {"=sum(Sales)<=$(Condition)"}>}Sales)

And enter 1600 as the variable value and see the diff.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Andrea_Ghirardello

Hi,

Thanks for your reply.

Interesting and it maybe a solution...depends on results Ferha Jafri needs to obtain.

My example is a general formula...you can write <, <=, >, >= and it works without changing the expression.

The formula you wrote needs a value for $(Condition) otherwise the chart will be populated with 0 for each product.

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

But when the input box is empty i m not getting any value although i want the table to remain as it is when nothing entered in the input box.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this.

     Sum({<Product = {"=if(not isnull($(Condition)),sum(Sales)<=$(Condition),'*')"}>}Sales)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable

Hi Ferha,

  Please find the attachment. This is one of the possible solution.

Regards,

Santhosh G

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

Thank you so much it worked..