Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I have a very easy question.
of adding an extra column based on the values from diffrent table.
Please refer to the QVD & Attachment.
It is adding an extra column called Bonus in the Table after salary. based on the multiplier factor from the other column range.Regards
Debashish.
Debashish,
as much as I don't like using IF statements in charts, this is one of those cases when it's needed:
sum(Salary * (if (Min <= Salary and Dalary <= Max, Multiplier))
cheers!
you're missing a closing parenthesis there..
sum(Salary*(if(Min <= Salary and Salary <= Max, Multiplier)))
Hi Thanks , Oleg ...
You have also Previously Solved .. much of my queries. and gave me how to think in Qlikview way.
I have got the solution. But i have 2 Queries.
1. Why u have added the "Sum" . I can see Sum only gives the Result.
2. What do u suggest me , if not we use IF Statement.
Do you suggest me to do someting in the Load Time to add the Bonus Column (like Resident Table Join) in the Edit Script.
Debashish wrote:Do you suggest me to do someting in the Load Time to add the Bonus Column (like Resident Table Join) in the Edit Script.
If you can do the calculation in the load script. then I suggest using INtervalMatch.
-Rob
Debashish,
if your data set is fairly small, it's OK to use IF statements - you won't affect performance too much. If you can pre-calculate the bonus in the script, without too much trouble, it would be better of course, because you are moving the heavy load from the run-time into the load time.
Regarding sum() - if this is a Straight Table, then we should use aggregation function (like sum) to ensure that our expression works at all summary levels - this way, you can present totals, or change your dimensions, and the expression will still be valid.
cheers,