Keddy
February 24, 2022, 1:32am
#1
I’m trying to get the difference of a distinct Count value to the value prior to it. I used the below formula but it showed an error “Please correct distinctCountOver to Pre_AGG or Pre_Filter level”
difference(distinctCountOver({Value},[{week},year]),[year ASC],-1)
Example:
Hi Keddy,
Does it work if you change expression to
difference(distinctCountOver({Value},[{week},year]),[year ASC, week ASC],-1)
Keddy
February 24, 2022, 4:17am
#3
Thank you Tatyana, however it seems the error still exists…
How about
difference(distinctCountOver({Value},[{week},year], PRE_AGG),[year ASC, week ASC],-1)
Keddy
February 24, 2022, 4:55am
#5
This doesn’t work as well. It’s really weird for “distinctCountOver”. I tried another formula and it worked now:
difference(sumOver(distinct_count(Value),[{week},year]),[year ASC, {week} ASC],-1)