Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
= 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.
How do you define vStartDate and vEndDate?
How are the variables defined? How are Products linked to Date and Actuals?
You need to post an example app.
HIC
vStartDate = Date(aggr(Date_of_Product),product_key)
vEndDate=Addmonths(vstartDate,2)
I guess that your two products have different startdates
can you check for each product what startdate is displayed (create textobject with vStartdate)
You need an aggregation inside your AGGR() function
Max()? Min()?
Date(aggr( here Date_of_Product),product_key)
Yes you are right the two products having different startdates so in that case, how I'm able to get the sum of Actuals of two products. Any idea.
First I used min (startdate) and I can achieve the correct results. But the requirement is like different dates for every product.
For a particular brand I have different products with different dates. So for overall - how I can achieve the result?
use min or max
= sum({<Date={">=min($(vStartDate))"}*{"<=max($(vEndDate))"}>} Actuals)
not sure if Syntax is correct
As hic techs us in https://community.qlik.com/blogs/qlikviewdesignblog/2015/10/05/pitfalls-of-the-aggr-function
1. Missing inner aggregation function
The first parameter of the Aggr() is a measure, and as such it is always an aggregation. Hence, you should use an aggregation function. If you don’t, the calculation will use Only() and the virtual table may inadvertently get NULLs in the Measure column. See more on Use Aggregation Functions!