Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have 2 variables defined as follows:
vBenchmarks
fractile( {$<Konto = $1, [Benchmark.Liegenschaftstyp] = {$(vLiegenschaftstyp)} , [Benchmark.Bewertungsjahr] = $(vReport_Jahr) >} [Benchmark.Wert] , $2)
vLiegenschaftstyp
chr(39)&[Bewertung.Liegenschaftstyp]&chr(39)
The field [Bewertung.Liegenschaftstyp] contains strings such as 'Wohnen', 'Geschäft/Büro',...
My variable vBenchmarks is not giving an output. However the output is correctly calculated if I use this expression instead:
fractile( {$<Konto = $1, [Benchmark.Liegenschaftstyp] = {'Wohnen'} , [Benchmark.Bewertungsjahr] = $(vReport_Jahr) >} [Benchmark.Wert] , $2)
Therefore the problem must arise when passing the variable vLiegenschaftstyp to vBenchmarks. What can I do to make it work? I assume it has to do something with string formating?
I tried nearly all possible variants to define vLiegenschaftstyp:
[Bewertung.Liegenschaftstyp], =[Bewertung.Liegenschaftstyp], text([Bewertung.Liegenschaftstyp]), =text([Bewertung.Liegenschaftstyp]),...
Thanks in advance
Hjalmar
Thanks, this sounds absolutely reasonable, however it didn't work in my particular case for some reason. In the meantime I found out that this works surprisingly:
vLiegenschaftstyp:
= chr(123)&chr(39)&[Bewertung.Liegenschaftstyp]&chr(39)&chr(125)
vBenchmarks:
= fractile( {$<Konto = $1, [Benchmark.Liegenschaftstyp] = $($(vLiegenschaftstyp)), [Benchmark.Bewertungsjahr] = $(vReport_Jahr) >} [Benchmark.Wert] , $2)
But still I'm not really able to understand why making a double $-sign expansion helps...
Best Regards
Try changing the expression to this:
fractile( {$<Konto = $1, [Benchmark.Liegenschaftstyp] = {'$(vLiegenschaftstyp)'} , [Benchmark.Bewertungsjahr] = $(vReport_Jahr) >} [Benchmark.Wert] , $2)
When you pass the variable, lets say 'Wohnen', the param is passed withouth the apostrophes, giving you an incomplete set analysis, like below:
expression('Wohnen') gives as a result for the set analysis:
fractile( {$<Konto = $1, [Benchmark.Liegenschaftstyp] = {Wohnen} , [Benchmark.Bewertungsjahr] = $(vReport_Jahr) >} [Benchmark.Wert] , $2)
Thanks, this sounds absolutely reasonable, however it didn't work in my particular case for some reason. In the meantime I found out that this works surprisingly:
vLiegenschaftstyp:
= chr(123)&chr(39)&[Bewertung.Liegenschaftstyp]&chr(39)&chr(125)
vBenchmarks:
= fractile( {$<Konto = $1, [Benchmark.Liegenschaftstyp] = $($(vLiegenschaftstyp)), [Benchmark.Bewertungsjahr] = $(vReport_Jahr) >} [Benchmark.Wert] , $2)
But still I'm not really able to understand why making a double $-sign expansion helps...
Best Regards