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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter in chart

In my script I have the following load:

%ORGKEY,

    
%PERIODEKEY,

    
%KONTOKEY

     BeløpTransSEK

FROM $(TransformFolderRegnskap)\FAKTA.QVD (qvd) where (Right(%KONTOKEY,4)=6340 OR Right(%KONTOKEY,4)=7190);

This gives me all the transactions/amounts (BelopTransSEK) for two given accounts, 6340 and 7190.

If I create a chart with SUM(BelopTransSEK) this will give me the total amount for both accounts. I just want to have the total for the 7190 account in one chart and the total for 6340 in a different chart.

How can I filter the chart so that it only gives me the total for one account at the time?

Labels (1)
4 Replies
kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

There are so many ways to get your result.

Add %KONTOKEY field in your dimension. it will slice the value based on your dimension.

else

use set analysis

sparur
Specialist II
Specialist II

Hi

in your case, I use Set analysis. try to create a new chart with such expression: sum({<%KONTOKEY = {"*6340"}>} BelopTransSEK) and another chart with another filter.

khadeer
Specialist
Specialist

Hi,

Create one more field in ur script as Right(%KONTOKEY,4) as Flag

Use this flag in ur set analysis like

sum({<Flag={6340}>}BelopTransSEK) in one chart

sum({<Flag={7190}>}BelopTransSEK) in another chart

Hope it helps you.

Regards,

Khadeer

Not applicable
Author

Hi,

Kumar answer is correct. But, if you use text objects for 2 different account sums then use the below set expression.

sum({<%KONTOKEY = {'7190'}>} BelopTransSEK)

sum({<%KONTOKEY = {'6340'}>} BelopTransSEK)