Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi ,
I would like to build a graph to show a count if customer who has called in a certain amount of days from starting with the company . the formula I am using is avg(distinct(if(CallStartDt<BillDate,BillDate-CallStartDt))) . Now I want to use this a calculated dimension for a bar graph.
maybe I am missing something.
regards,
marvin
May be like this
Dimension
Aggr(If(CallStartDt < BillDate, BillDate-CallStartDt), Customer)
Expression
Count(DISTINCT Customer)
Make a flag in Script
If(CallStartDt < BillDate,1,0) as Flag
Then
Dimension
Aggr(if(Flag=1, BillDate-CallStartDt),Customer)
Even Better if possible(depending on your datamodel)
If(CallStartDt < BillDate,BillDate-CallStartDt,'NA') as DateDiff
Then Dimension
Aggr(if(DateDiff<>'NA',avg(DateDiff)),Customer)
Hi Marvin,
You can use following.
Dimension:- aggr(avg((if(CallStartDt<BillDate,BillDate-CallStartDt))),Customer)
Expression:- Count(DISTINCT Customer)
Thanks,