Discussion board where members can learn more about Qlik Sense App Development and Usage.
Hi All,
I have the below data.
Date | Group | ID | Value1 | Value2 |
1/31/2018 | A | 1A | 110 | 100 |
1/31/2018 | A | 2A | 130 | 115 |
1/31/2018 | B | 1B | 260 | 215 |
1/31/2018 | B | 2B | 275 | 250 |
2/28/2018 | A | 1A | 175 | 150 |
2/28/2018 | A | 1B | 130 | 110 |
2/28/2018 | B | 2A | 150 | 125 |
2/28/2018 | B | 2B | 180 | 140 |
I want to create a measure that multiples sum(Value1)/sum(Value2) across dates such as below.
Date | sum(Value1)/sum(Value2) |
1/31/2018 | 1.139705882 |
2/28/2018 | 1.20952381 |
Product | 1.378501401 |
I had been turned onto the Exp(Sum(Log))) method of calculating this but I am not seeing the values I am expecting. I tried using Exp(Sum(Log(Value1/Value2))) and Exp(Log(sum(Value1)/sum(Value2))) and still am not getting what I am looking for.
Does anyone have any ideas?
Thanks!
Mark
This is a nested sum, so you need an Aggr().Something like:
=Exp(Sum(Aggr(Log(Sum(Value1)/Sum(Value2)), Date)))
You want to do this in a KPI object or a table object?
This is a nested sum, so you need an Aggr().Something like:
=Exp(Sum(Aggr(Log(Sum(Value1)/Sum(Value2)), Date)))