Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I 've a qlikview dashboard with many metrics that do the same operations but to different fields. To avoid repeating lines of code i organize it with variables with parameters. I am trying to use one of this parameters which is using some calculations but it is not working. Following i pass a sample of how it looks:
THIS IS WORKING:
variables:
vDelivery_CSAT_DSAT = sum({<$1>} $2) / sum({<$1>} FIELD_CSAT_DSAT_TOTAL_FLAG)
vfilter_1= [Region]={'EUROPE'}
vfilter_2= [Region]={'USA'}
Then in the expressions I use it like this:
EXP 1: $(vDelivery_CSAT_DSAT($(vfilter1),FIELD_CSAT_FLAG))
EXP 2: $(vDelivery_CSAT_DSAT($(vfilter2),FIELD_DSAT_FLAG))
THIS IS NOT WORKING
What i want and can't accomplish is using in the filter some calculations just like this:
vfilter3 = [DATE]={ ">=$(=addmoths(today(),-12))"}
Nevertheless this works when using it directly in the expression:
sum({<[DATE]={ ">=$(=addmoths(today(),-12))"}>} FIELD_DSAT_FLAG) /
sum({<[DATE]={">=$(=addmoths(today(),-12))"}>}FIELD_CSAT_DSAT_TOTAL_FLAG)
How could i do it? As said before, i need to do it like this becose there are a lot of metrics that use the same calculations and i want to save code and lines.
Thanks!!
Hi
Have you tried it with out the dollar expansions, so
$(vDelivery_CSAT_DSAT(vfilter1,FIELD_CSAT_FLAG))
Mark
Hi
Have you tried it with out the dollar expansions, so
$(vDelivery_CSAT_DSAT(vfilter1,FIELD_CSAT_FLAG))
Mark
Wow! Thank you Mark 1 shot 1 hit!
This totally made the job!