Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
The below if statement is not working. I dont know why. It is only calculating values for the <4 part not the =4 or =5 part.
if([Intervall RD]<'4',[Rörlig Lön]*[Procent RD],
if([Intervall RD]='4',[Rörlig Lön]*%AvBudget,
if([Intervall RD]='5',[Rörlig Lön],0)))
as Utbetalt
I am happy for any help to solve this.
//Fredrik
1) Just remove the quotes:
if ([interval RD] < 4 ......)
2) check also the numbers of this Intervall RD field
Fabrice
I recommend you trying each if separately...
The field [Intervall RD] is numeric??? If it's numeric, so this
if([Intervall RD]<4,[Rörlig Lön]*[Procent RD],
if([Intervall RD]=4,[Rörlig Lön]*%AvBudget,
if([Intervall RD]=5,[Rörlig Lön],0)))
as Utbetalt
might be its getting always < 4, so in that case it will not go to the else part...
make sure you have the [Intervall RD]=4 values.
or do a try to ,
if([Intervall RD]<4,[Rörlig Lön]*[Procent RD],
if([Intervall RD]=4,[Rörlig Lön]*[%AvBudget],
if([Intervall RD]=5,[Rörlig Lön],0)))
If you´re using a table, add an expression with [Intervall RD] and check the values this expression can assume
Hi
Intervall RD is numeric and I have values for all [Intervall RD]. I have included a printscreen of the table here. Where it is visible that only calculations for the values [Intervall RD]<4 are being made and null values for [Intervall RD]=4 and [Intervall RD]=5.
Whats the expresion for %AvBudget?
It is a calulated value that I have imported from another table. It is a numerc value that I want to multiply with for the records where [Interval RD]=4
Could you post the exact expression?
left join (UtbetBeräkningar)
load *,
if([Intervall RD]<4,[Rörlig Lön]*[Procent RD],
if([Intervall RD]=4,[Rörlig Lön]*%AvBudget,
if([Intervall RD]=5,[Rörlig Lön],0)))
as Utbetalt
resident UtbetBeräkningar;
Written before in the script.
left join (UtbetBeräkningar)
load *,
UtfallTot/SäljBudgetTot as %AvBudget
resident UtbetBeräkningar;
left join(UtbetBeräkningar)
IntervalMatch(%AvBudget) load [Start Intervall RD], [Slut Intervall RD] resident RDMapping;