Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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

Not sure, but may be this in a text box object

=Exp(Sum(Aggr(Log(1+Sum(Sales)), TimeKey))) - 1

Anonymous
Not applicable
Author

Hi Pradosh ,Thanks for the response

This works for me however i have an additional filter that i would like to apply here.

The user gets to select a start date and an end date from timekey dimension and i want this formula to work for that date range.

How to incorporate this date range filter in the formula you have suggested ??

Please let me know if you need further clarification.

pradosh_thakur
Master II
Master II

you are going to use extension for start date end date from a single dimension?

Learning never stops.
Anonymous
Not applicable
Author

No i cant use extensions

Start date and end date are seperate tables at all so selecting them doesnt change anything with calculations . What i am doing is storing the value selected from start date and end date in variables vStart and vEnd and now i want all the timekeys b/w vStart and vEnd to be automatically selected and applied to the formula you suggested. Something like this i want to add to set analysis

Timekey={'>= vStart <=vEnd'}

pradosh_thakur
Master II
Master II

That wont be a issue i suppose. You just have to use them by set analysis. Please post those variables details or the app like you posted before .

regards

Pradosh

Learning never stops.
Anonymous
Not applicable
Author

I have Uploaded the updated qvf. All i want is whatever i choose from start and end date , automatically timekeys between start and end date should get selected and applied to the formula you suggested. Obviously user will select end date greater than or equal to start date. Thanks a lot for helping.

sunny_talwar

May be this

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

Anonymous
Not applicable
Author

Do we have to hardcode ABC,DEF ? because i am choosing dimension at runtime.

sunny_talwar

‌At the runtime? What does that mean?

Anonymous
Not applicable
Author

i am choosing ABC or DEF from Select_Dim filter if you see the app again.