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.
try below:
vStartDate = Date(min(aggr(min(Date_of_Product),product_key)))
I guess you Need min max in variable
vStartDate = min(Date(aggr(Date_of_Product),product_key))
vEndDate=Addmonths(vstartDate,2)
then you can Keep the expression
= sum({<Date={">=$(vStartDate)"}*{"<=$(vEndDate)"}>} Actuals)
The requirement is like different date for different product so I have removed the min from the variable. Now I can get the value for every product but when i click on Brand it is not giving the proper summation. Date difference is not working perfectly.
So where I have to use the aggregation exactly to resolve the issue. I have tried aggr() but its not working. Is there any solution for this issue?
A solution would be using AGGR as designed, with a inner aggregation function.
Please describe what vStartDate should return
vStartDate should return the date_of_product which differs for each product
But what if you have "two products at the same time"? Which date should be returned?
Remember that a variable (like a function) in general returns an atomic value (only one)
yes.. But this is what the requirement. So I couldn't find the solution. seeking the help of experts. Is there any way to achieve this ?
But what if you have "two products at the same time"? Which date should be returned?
Hi Vinu,
Your variable will not return the correct value:
Try like this:
vStartDate = Date(aggr(min(Date_of_Product),product_key)
vEndDate=Addmonths(vstartDate,2)
exp:
= sum({<Date={">=$(vStartDate) <= $(vEndDate)"}>} Actuals)
Regards
KC