Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sum based on two dates

= sum({<Date={">=$(vStartDate)"}*{"<=$(vEndDate)"}>} Actuals)


The above equation shows the correct value when i click on each and every product. But when I click on Brand wise, it is not providing the correct value. The date range is not working if i click on two products at the same time.


Am I missing any aggregation for date? Any suggestions will be appreciated.

25 Replies
Not applicable
Author

It should calculate the actuals based on the date difference for every product and for Brand the overall should be returned.

Clever_Anjos
Employee
Employee

Is it possible to post a sample of your app?

It would be easier to help

Preparing examples for Upload - Reduction and Data Scrambling

Not applicable
Author

Jyothish,

But i can't get the correct result. It should be based on each date difference for each product.

jyothish8807
Master II
Master II

Hi Vinu,

If you can share a sample app then it will be easy to debug. right now your requirement is not clear to me.In your scenario when ever you select a product of brand, your vStartDate will change accordingly.

What kind of chart are you making ? What is your dimensions ?

You can try this also:

vStartDate = Date(aggr(min(Date_of_Product),Brand,product_key)


Regards

KC

Best Regards,
KC
Not applicable
Author

Hi Megha,

But I couldnt get the overall. if I use min for Date_of_Product - my logic is based on the date for every product.

Not applicable
Author

The issues resolved by creating flags in the datamodel to different the date restrictions. Instead of using variables, flag is created to resolve.