Discussion Board for collaboration on QlikView Scripting.
how can I use many filters to get a sum() ?
load ID, Name, City, Amount From ...
Now I want to use a statusbox, to sum the amount with specific filter like: amount from Berlin and London; or amount from Dublin,...
with that funktion filter, I want to show the amount, that I really need.
Because I want to show many Amounts without selecting by clicking this to compare them - like to have an overview in my statisticbox with many sums..
Go to Solution.
You can use the Resident Load with Where Condition and Group By clauses..
Kindly Update your sample data along with desired out put. will try to help you out.
load * inline [
ID, Name, City, Amount
1, John Smith, London, 10
2, Harry Gordon, Paris, 20
3, Lisa Müller, Berlin, 30
4, Josh Miller,New York, 40
5, Elisabeth Miller, New York, 50
Now I don't want to select / filter by my Script. I want to use the statisticsbox for sum:
1. box "Europe": sum( Amount) where "City" = 'Berlin' and where "City" = 'London' and where "City" = 'Paris'
2. box" USA": sum(Amount) where "City" = 'New York'
Yes right, but what about if I need more then 1 filter/condition like:
Amount from Berlin and New York?
Load City, SUM(Amount) as Europe Resident Temp where City = 'New York' and where City = 'Berlin' Group By City;
What I mean is to use several times the where command for filterung the City and ID
Load City, SUM(Amount) as BerlingNYAmount Resident Temp
Where City = 'New York' or City = 'Berlin' Group By City;
Thanks much !
But I still got a problem:
If I use:
Load City, SUM(Amount) as USA.Amount Resident Temp where City = 'New York' Group By City;
within using statisticsbox: sum(USA.Amount)
Share your QVW please
and what about if i wanna select x=ID like
x= >3 and x=<5