I'm new at QLIK View and i'm having difficulty to sum a quantity with conditions. Here's the thing:
I need to Sum all the collumn "Day to Day * Real" and divide that for the sum of the Real collumn. All that aggregate by the "Ano" collumns, the "Mês" column and the B and C collumn there in blank. All of that to appear in another collumn next to it. That would be (done in Excel):
I tried the
Sum(Aggr([Day to Day * Real],Ano,Mês,B,C))
With no luck... It's just returns 0s...
Can anyone help me?
Thanks a lot!!!
Sorry for the late reply my friend.
Yes, it was a calculated dimension, but i was able to solve my problem using aggregate.
I used Aggr on all the sum( "day to day" x "real")
and then divided that aggr for the aggr sum("real")
Using year, month and country for the dimensions in the aggr.
Thanks for all the replies and will have another problem in my next post that is a challenge one!
Column "Ano" = Year (2019,2020)
Column "Mês" = Month (1,2,3,4,5,6,7,8,9,10,12)
Column B = Information about the country (Ie: Blue, Red, Green)
Column C = The client (Ie: Russia)
Therefore the sum should be aggregate by the year (in this case 2020), by the month (4) and the Column C (Russia)
In other words i would be summing all the data from "Day to Day * Real" for the year of 2020, the month of 4 and the country of Russia, divided by the summing of all data from "Real" for the year of 2020, the month of 4 and the country of Russia.
The Programed, Real,Day to Day and "Day to Day * Real"are expressions
Still not working... If i just put Sum( TOTAL <Year,Month,Country> [Day to Day * Real] )
which should bring me the result of the sum of the "Day to Day * Real" column aggregate by the year, month and country, it brings me "0" values.