Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
m_perreault
Creator III
Creator III

Exp(Sum(Log))) Across Multiple Dimensions

Hi All,

 

I have the below data.

 

DateGroupIDValue1Value2
1/31/2018A1A110100
1/31/2018A2A130115
1/31/2018B1B260215
1/31/2018B2B275250
2/28/2018A1A175150
2/28/2018A1B130110
2/28/2018B2A150125
2/28/2018B2B180140

 

I want to create a measure that multiples sum(Value1)/sum(Value2) across dates such as below.

Datesum(Value1)/sum(Value2)
1/31/20181.139705882
2/28/20181.20952381
Product1.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. 

RangeProduct.png

 

Does anyone have any ideas?

Thanks!

Mark

 

Labels (3)
1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

This is a nested sum, so you need an Aggr().Something like:

=Exp(Sum(Aggr(Log(Sum(Value1)/Sum(Value2)), Date)))
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
sunny_talwar

You want to do this in a KPI object or a table object?

jonathandienst
Partner - Champion III
Partner - Champion III

This is a nested sum, so you need an Aggr().Something like:

=Exp(Sum(Aggr(Log(Sum(Value1)/Sum(Value2)), Date)))
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein