Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can i achieve multiply(sales) in qlik sense
So in the attached example, is something not working because of the selections you make?
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
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