Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set analysis with alternative States

Hello everybody,

I explain my problem.

I have to calculate some indicators about the impact of an pub and to compare the indicators of the current pub to the indicators of the last year pub…..

For information,The pub have an date of begin and an date of end and the table is directly joined to the fact table "Movement"..

For make the comparaison possible, I ve created an alternative states on Pub. His name is PubA.

For example, One of the indicators is the valorization of the stock at the beginning of the pub. The formular for this indicator is

Valorsisation( current Pub)= 

sum({$ <%date={">=$(=vDATE_INIT)<=$(=vDATE_DEB_PUB)"},Année=,Mois=,Pub = >}mvt.Qte)

vDATE_INIT=(‘01/01/2010’) is the beginning of all the movement of my stock independent of my pub

vDATE_DEB_PUB= is the date of the beginning of the current Pub

So when I choose an Date in my list selection of my application, my indicator give me the result of my stock at the date When began the pub…..This indicator gives us good result.

But now I would like to compare this indicator to an the pub of the last year or another… So,  I try to buid an indicator which will react only to   :

sum({[PubA]<%date={">=$(=vDATE_INV)<=$(=vDATE_DEB_PUB)"},Année=,Mois=,Pub= >}mvt.Qte)

I would like to know of the syntax is correct or this good way to build the comparison ?

2 Replies
Not applicable
Author

I don't see why you would need square brackets around the alt state name, maybe try removing those?

One other consideration is whether you actually have the variable will be defined in the same for the alt state, if you don't then that might also be the issue

Not applicable
Author

Thank for your answer,

I ve tried to take off the square brackets, but it give again an strange result...

It 's maybe the problem, i ve to create one other  variable wich will react on my alternative selection and contain the

Date of the beginning of the pubA,

DATE_DEB_PUB=date( Date_begin ,'DD/MM/YYYY') (Date of the current selection)

DATE_DEB_PUBA= ?????            (Date of the Alternative State)


How could i put into an variable the value of an field for an alternative selection ?

is it possible ?



In fact, the new formular will be like at the end  if the varaible contains the value of the beginnig date for the alternative state  ...

sum({[PubA]<%date={">=$(=vDATE_INV)<=$(=vDATE_DEB_PUBA)"},Année=,Mois=,Pub= >}mvt.Qte)