Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have got a problem with the aggr function. What I need is the following:
I have got three tables as you can see in amge below:
When selecting a period from table movvalor1 (Month = January and Year = 2009) I need the following calculated:
Now the problems start:
Any ideas on how to get the totals correct in the three charts??
Let me know if you need more info or if you need the QWV doc to investigate.
Thanks
Here you go.
BTW, just a recommendation, I would avoid using characters like "°" in names, also that many spaces, it makes writing expressions that much more difficult and is more error prone.
Also you're using AnoMV as a field in some set analysis expressions while the correct field name is AñoMV.
QVW file is almost always useful.
Your expression should look something like this
Sum(Aggr(
sum(cantidad facturada_MV)
*
sum({<[Nº mov_ producto2]=P([Nº mov_ producto]), NºAñoMesMV2= {'<=$(=(max(NºAñoMesMV)))'},NºAñoMesMV, AñoMesMV, AnoMV, MesMV =>}Portes)
/
sum({<Nº mov_ producto2]=P([Nº mov_ producto]), NºAñoMesMV2= {'<=$(=(max(NºAñoMesMV)))'},NºAñoMesMV, AñoMesMV, AnoMV, MesMV =>}[Cdad_ valorada])
, [N° Cliente], [N° producto])
)
With this you force QlikView to do all calculations al product/customer lever and them add it up.
Thanks Daniel,
It still doesn´t work however. I had tried similar expressions without luck. Let me know how I can send you the example.
Thanks in advance.
You can try attaching it to your initial post.
Here you go.
Thanks in advance for the effort.
Here you go.
BTW, just a recommendation, I would avoid using characters like "°" in names, also that many spaces, it makes writing expressions that much more difficult and is more error prone.
Also you're using AnoMV as a field in some set analysis expressions while the correct field name is AñoMV.
Thanks Daniel.