Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi the community !
I would like to shorten this expression to use it in set analysis :
sum(({<Indicateur = {'Pages Vues en Total'}>} Valeur)/1000000)
i will need to use 'Pages Vues en Total' (=pages views) in Sum or Avg.
i tried to create a VARIABLE " Var.PV" =
({<Indicateur = {'Pages Vues en Total'}>} Valeur)/1000000
I do not manage to use ot in the expression as
sum(Var.PV)
Then, i will have to use this VARIABLE in that kind of expression, to compare it VS previous month :
( sum( {<Mois = {$(=num(Max (Mois),'00'))}>} [VARIABLE])-sum( {<Année = {$(=num( if(max(Mois)=1, Max (Année)-1,Max (Année)) ,'00'))}, Mois = {$(=num( if(max(Mois)=1, 12, max(Mois)-1) ,'00'))}>} [VARIABLE]) ) /sum( {<Année = {$(=num( if(max(Mois)=1, Max (Année)-1,Max (Année)) ,'00'))}, Mois = {$(=num(if(Max (Mois)=1,12,max(Mois)-1),'00'))}>} [VARIABLE])
Any idea of the syntax ?
Thank you for your help.
You need to remove the two brackets from within the variable, or from where you are using it.
When the variable is copied and pasted (effectively) into your code you get:
sum(({<Indicateur={'Pages Vues en Total'}>}Valuer)/1000000)
Because of the double bracket at the start, the Set Analysis code is not part of the sum, rather in a bracketed set of code by itself, and set analysis doesn't work like that.
Hope that makes sense?
Thank you Steve for your time.
But it does not work.
These are the variable and the expression :
sum($(var.PV))
You need to remove the two brackets from within the variable, or from where you are using it.
When the variable is copied and pasted (effectively) into your code you get:
sum(({<Indicateur={'Pages Vues en Total'}>}Valuer)/1000000)
Because of the double bracket at the start, the Set Analysis code is not part of the sum, rather in a bracketed set of code by itself, and set analysis doesn't work like that.
Hope that makes sense?