Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm working on a app that uses set analysis to tell me how many times a telephone number called on each previous selected day. I thought that it would only look for records in the dimension, but if a telephone called on the day before, it adds that record in the dimension. I need to get the set analysis to look back to the base day (dimension), but now I'm thinking aggr might be needed.
Here's my expression. I have 30 of them. -1, -2, -3, and the further I go back, the more telephone numbers are added.
sum({<datekey={"$(=Date(vdatekey - 1))"}>}Ct)
I've searched and can't find a way to implement it. Can anyone tell me what I'm doing wrong or if I'm taking the wrong approach?
Thanks. Tweaked it a little more. Here's the final result:
if(aggr(only({<datekey={"$(=Date(vdatekey))"}>}TelephoneNum),TelephoneNum) =
aggr(only({<datekey={"$(=Date(vdatekey - 1))"}>}TelephoneNum),TelephoneNum) or
aggr(only({<datekey={"$(=Date(vdatekey))"}>}TelephoneNum),cName) =
aggr(only({<datekey={"$(=Date(vdatekey - 1))"}>}TelephoneNum),cName),
sum({<datekey={"$(=Date(vdatekey - 1))"}>}Ct),0)