Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey @all
I am looking for a way to bring this calculation to a QlikView expression:
(
[value1_month1] * [value2_month1] +
[value1_month2] * [value2_month2] +
[value1_month3] * [value2_month3]
) / (
[value1_month1] + [value1_month2] + [value1_month3]
)
This is just an example.
The result should be reacting on the selection of the month.
So if you select March, April, June and July this 4 should be used in the calculation.
I have made a few tries with the aggr() function before but have not a working result yet.
Are there any possibilities instead of using a fixed number of months?
Thank you for your help.
S.Koenen
So you weight your "value2" with a "value1". Then a straightforward
Sum([value1] * [value2]) / Sum( [value1] )
should do the trick.
HIC