Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
How can we do a sum on change of a dimension?
for eg
Calculate the salary received till today on change of employee name which is a dimension?
Emp Name | Dept | Salary |
---|---|---|
Tom | Finance | 1000 |
Evan | Accounts | 2000 |
What happens now is it calculates sum of all the salaries.I need the sum for each employee or when Emp Name changes?
How to achive that
Regards,
Sab
Not sure if I understand,
but if you create e.g. a straight table chart and out [Emp Name] as dimension, and as expression
=sum(Salary)
, you get the total of all Salaries in each line? Then you need to check you data model, could you tell us a bit more about it (how the tables are defined and how they are linked)?
Regards,
Stefan
Hi Swuehl,
First of all thanks for your reply.
I tried this but its summing up everything.
Regards,
Sab
Ok, but how does your data model look like?
It seems to me that the table that contains [Emp Name] field is not correctly linked to the table containing Salary field.
Hi Swuehl,
Forgot to mention its just one view from where it is coming so no linking is there anyway.
Regards,
Sab
That sounds strange, then. Is there a possibility that you upload a small sample (upload available in advanced editor)?
Hi swuehl,
Seems strange but works now.
Thanks for the help anyway.
i had shut qlikview and started again.
Thanks again
Regards,
Sab