Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all.
I have a pivot table with to calculations that doesen't give me the right value.I have the right values for every row when I expand the table but when the table is collapsed the "total" is wrong. Se example below:


Expression for num days:
count({$<Salary_ID={'col'}, Absence_ID={'vac'}>} DISTINCT Start_Date)
Expression for Value:
(count({$<Salary_ID={'col'}, Absence_ID={'vac'}>} DISTINCT Start_Date))*(sum({$<Salary_ID={'col'}, Absence_ID={'vac'}>} Unit_Price))
Suggestions to solve this?
Well, technically the totals are correct. You did ask for distinct start dates. Perhaps you want something like this instead: sum(aggr(count({$<Salary_ID={'col'}, Absence_ID={'vac'}>} DISTINCT Start_Date), Account_..., Home_CC,Employee_ID))
Well, technically the totals are correct. You did ask for distinct start dates. Perhaps you want something like this instead: sum(aggr(count({$<Salary_ID={'col'}, Absence_ID={'vac'}>} DISTINCT Start_Date), Account_..., Home_CC,Employee_ID))
Perfect! But how to solve the next expression for the column Value?
(count({$<Salary_ID={'col'}, Absence_ID={'vac'}>} DISTINCT Start_Date))*(sum({$<Salary_ID={'col'}, Absence_ID={'vac'}>} Unit_Price))
Thanks a lot Gysbert for your reply. I solved the second question I had.