Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
RayWu
Contributor III
Contributor III

How to make the value shown in the chart not exceed the value of the Filter pane?

How to make the value shown in the chart not exceed the value of the Filter pane? This problem has been bothering me for a long time. Please help me. Thank you.

Note: A supplier has multiple transaction records.

Labels (2)
1 Solution

Accepted Solutions
Pertjo
Partner - Contributor III
Partner - Contributor III

I think i got a answer to your question! 

So you can do this the good way and a little less good way. 

You can hardcode a expression in your barchart like this  Sum({$<Amount={">=10<=50"}>} Amount) 

But! that is not good because sometimes you want to see other values then "10" and "50" 

 

The you do to Variabels 

VminAmount and VMaxAmount.  
You can do Variabels by pressing the button on the left down corner. and then "create new" put the value to "=0" for both. 

Then if you have a newer Qlik sense version use the "Variabel input" under "Qlik Dashbaord bundle"  

Use the varibel for them and the user will be able to set the min and max by them self easy. 

And the expression: Sum({$<Amount={">=$(VminAmount )<=$(VmaxAmount )"}>} Amount) 

Hope this helps! 

 

View solution in original post

10 Replies
Pertjo
Partner - Contributor III
Partner - Contributor III

There is better ways to get the amount under 5000 then trying to filter on it.
When you write "<5000" in the filter panel you will gett all the values that are below 5000 but they can sum up to more.
I would start using Set analysis and set expressions.

What you also could do, if yo want to control the value based on the filter pane, in the measuerment for the barchart just write "Amount(USD)" without an aggregation like "sum"

Then the chart will just show the values you select


lironbaram
Partner - Master III
Partner - Master III

hi

what you filter is the transactions and than in the chart you aggregate all transaction so 

if you want to filter by chart amounts , 

you can either filter the field supplier with expression  like this : =sum(transactions)<5000

or filter directly on the chart axis

RayWu
Contributor III
Contributor III
Author

We need to count data for a certain period of time, so we need to use "sum." Users can query data for a certain period of time. The data for the last year is displayed by default.

sum({<Date= {">=$(=AddMonths(Max(Date), -11))"}>}[Amount])

The data queried are not fixed. For example, > 50000, < 100000, > 50000 < 100000.

Do you have any method?

RayWu
Contributor III
Contributor III
Author

The data queried is not fixed. For example, > 50000, < 100000, > 50000 < 100000.

If you have a way, please help me, thank you!

Pertjo
Partner - Contributor III
Partner - Contributor III

Yeah, will try to help you out. 

Just need a bit better understanding of the problem.  It's note clear what you are trying to accomplish 

Could you share the app with limited or dummy data? or explain in more detail on what you are trying to do? 

you use this expression: sum({<Date= {">=$(=AddMonths(Max(Date), -11))"}>}[Amount])

Your "Date" Dimension is it YearPeriod, timestamp or just Period?

BR

Per Hellborg

 

RayWu
Contributor III
Contributor III
Author

The data of this APP is connected to the company's database.
Please open the attached "Fields. png" to see Fields.
As the attached "Desired.png" is our expectation.

Pertjo
Partner - Contributor III
Partner - Contributor III

I think i got a answer to your question! 

So you can do this the good way and a little less good way. 

You can hardcode a expression in your barchart like this  Sum({$<Amount={">=10<=50"}>} Amount) 

But! that is not good because sometimes you want to see other values then "10" and "50" 

 

The you do to Variabels 

VminAmount and VMaxAmount.  
You can do Variabels by pressing the button on the left down corner. and then "create new" put the value to "=0" for both. 

Then if you have a newer Qlik sense version use the "Variabel input" under "Qlik Dashbaord bundle"  

Use the varibel for them and the user will be able to set the min and max by them self easy. 

And the expression: Sum({$<Amount={">=$(VminAmount )<=$(VmaxAmount )"}>} Amount) 

Hope this helps! 

 

kaanerisen
Creator III
Creator III

Hi RayWu,

You should filter your dimensioni, not amount field.

You should write an expression to the supplier field or what your dimension is on the chart

sum({<Date= {">=$(=AddMonths(Max(Date), -11))"}>}[Amount]) >1000 sum({<Date= {">=$(=AddMonths(Max(Date), -11))"}>}[Amount])<5000

what you do now is just filtering the transaction records.

RayWu
Contributor III
Contributor III
Author

Thank you very much! It's a good way. I have used this extension to solve this problem.