Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I defined the following variables:
- vPraticheCaricateMeseCorr = count({< FlagCaricatoLiquidato={'Caricato'}, AnnoMese = {$(=$(vMaxAnnoMese))}>} distinct ContrattoID)
- vPraticheCaricateMesePrec = count({< FlagCaricatoLiquidato={'Caricato'}, AnnoMese = {$(=$(vMaxAnnoMesePrec))}>} distinct ContrattoID)
Then I used the variables in a chart expression as follows:
($(vPCaricateMeseCorr)-$(vPCaricateMesePrec))
/
($(vPCaricateMesePrec))
The chart is a pivot table with one dimension and multiple expressions besides the one I have shared with you.
Every works fine.
However, if I change the variables definition as:
- vPraticheCaricateMeseCorr =
if(GetSelectedCount(AnnoMese)>0,
count({< FlagCaricatoLiquidato={'Caricato'}, AnnoMese = P(AnnoMese)>} distinct ContrattoID),
count({< FlagCaricatoLiquidato={'Caricato'}, AnnoMese = {"$(=Max(AnnoMese))"}>} distinct ContrattoID)
)
- vPraticheCaricateMesePrec =
if(GetSelectedCount(AnnoMese)>1,
null(),
count({< FlagCaricatoLiquidato={'Caricato'}, AnnoMese = {$(=$(vMaxAnnoMesePrec))}>} distinct ContrattoID)
)
The expression in the chart stops working and shows '-' for all rows.
I think there is a problem with the dollar sign expansion but I am not able to solve it. So far I have tried to add brackets like:
(($(vPCaricateMeseCorr))-($(vPCaricateMesePrec)))
/
($(vPCaricateMesePrec))
which does not work and also
($(=$(vPCaricateMeseCorr)-)$(=$(vPCaricateMesePrec)))
/
($(=$(vPCaricateMesePrec)))
but the last attempt is showing the total in all rows of the table, which happen even if I add the "=" sign in front of the variable definition.
Any suggestion?
Thanks in advance,
Stefania
Have you put your 2 expressions into a text box to see their values? I'm guessing one of them is null.
Yes I have .. both of them are not null.
Why are you using if(GetSelectedCount(AnnoMese)>0 in the first expression and if(GetSelectedCount(AnnoMese)>0 in the second expression?
It would help if you could post a small example qvw file that demonstrates the issue.
may be change this
- vPraticheCaricateMesePrec =
if(GetSelectedCount(AnnoMese)>1,
0,
count({< FlagCaricatoLiquidato={'Caricato'}, AnnoMese = {$(=$(vMaxAnnoMesePrec))}>} distinct ContrattoID)
)