Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
Qlikview is so much time consuming
I have this simple formula in my Load script:
Set sm.f_Volume_J=
[
sum(
{$<
//Métier_SMART={'EPARGNE'},
MMM_YY_REF_ID={">=$(=num(date(AddMonths(Max(MMM_YY), -12), 'MMM YY')))"},
sm.Statut_SMART={'TRAITÉ','MIS EN INCOMPLET','NON CONFORME'},
sm.J=$2,
sm.SLA=$1,
sm.Réseaux_SMART={'BPF'}
>
}
sm.Nombre_Smart)
];
I use it like this and everything works fine :
$(sm.f_Volume_J({'Nantissement'},{"*"}))
$(sm.f_Volume_J({'Non financier''},{"*"}))
Now I want the sum of the 2 above :
=$(sm.f_Volume_J({'Nantissement','Non financier'},{"*"}))
=> don't work. No result.
I have to do:
=$(sm.f_Volume_J({'Nantissement'},{"*"}))+$(sm.f_Volume_J({'Non financier'},{"*"}))
Seems crazy.
Anybody has an idea why this doesn't work ?
Each comma-sign within the parameters will be treated as a delimiter between parameters. This meant you mustn't be use any comma within a single parameter.
This meant you need to find another way to write your parameters and/or the combination of declaring and calling the variables (splitting into more parameters, replacing the comma with chr(44) or other chars and reacting approriate on them). Quite often there are ways to handle it but they aren't always sensible because variables with and without parameters should simplify things and not result in the opposite.
In your case you could try it with the following:
=$(sm.f_Volume_J({("Nantissement"|"Non financier")},{"*"}))
- Marcus
Hi Marcus,
Thanks for your reply.
I've found a way to deal with it by adding the different values like that:
$(sm.f_Volume_J({'Nantissement'},{"*"}))
+$(sm.f_Volume_J({'Non financier'},{"*"}))
There are no escape characters within Qlik ?
AFAIK there is no escaping for the commas else only replacing/avoiding approaches for it. Nevertheless might the following be helpful in any way: Escape sequences.
- Marcus