Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

I want to perform Multiply(Sales) instead of Sum(Sales). How can i do it in qlik sense.

How can i achieve multiply(sales) in qlik sense

22 Replies
sunny_talwar

‌So in the attached example, is something not working because of the selections you make?

pradosh_thakur
Master II
Master II

Hi Sayyam

You should use sunny's solution as it is more flexible to change and adaptable. If you go for my solution changes will make your life tougher.

stalwar1‌ really nice way to approach the requirement with  exp and log . I guess Sayaam was trying to ask about =Exp(Sum(Aggr(Log(1+Sum({<TimeKey = {"$(='>=' & Date(Min(Date#(Start_Date, 'YYYYMMDD'))) & '<=' & Date(Max(Date#(End_Date, 'YYYYMMDD'))))"}>}Sales)), TimeKey, ABC, DEF))) - 1

I think we can use  this instead if he thinks more of those value gonna come in future.

=Exp(Sum(Aggr(Log(1+Sum({<TimeKey = {"$(='>=' & Date(Min(Date#(Start_Date, 'YYYYMMDD'))) & '<=' & Date(Max(Date#(End_Date, 'YYYYMMDD'))))"}>}Sales)), TimeKey, $(=concat(Select_1st_Dim,',')) ))) - 1

regards

Pradosh

Learning never stops.
sunny_talwar

I guess I am not really sure I understand this dynamic dimension from the sample app.. but if that's what the requirement is, I would use something like this

=Exp(Sum(Aggr(Log(1+Sum({<TimeKey = {"$(='>=' & Date(Min(Date#(Start_Date, 'YYYYMMDD'))) & '<=' & Date(Max(Date#(End_Date, 'YYYYMMDD'))))"}>}Sales)), TimeKey,

$(=If(GetSelectedCount(Select_1st_Dim) = 1,

Pick(Match(GetFieldSelections(Select_1st_Dim),'ABC', 'DEF'), 'ABC', 'DEF'),

'ABC')) ))) - 1