5 Replies Latest reply: Mar 16, 2012 6:47 AM by Lav Jain

# Problem on expression using <total> for calculating percent of time

Hello,

I have a problem with expression calculation.

I have three empoloyees, EmpA, EmpB and EmpC. I also have three activities, ActA, ActB and ActC. Each employee works on an activity and I get the total hours by using the expression sum(HoursWorked). I also calculate the % of hours the particular employee worked on a specific activity. The results are fine until I make a selection of an employee where the % of hours worked changes to 100% instead of remaining to the percentile it was prior to the selection. For caclulating the % I use the expression: sum(HoursWorked)/sum(total <Activities> HoursWorked).

Any help will be appreciated.

Thanks,

--John

• ###### Problem on expression using <total> for calculating percent of time

You can try disregarding the selection in the denominator:

sum(HoursWorked) / sum({<EmpName=>} total <Activities> HoursWorked)

And enable the option 'supress zero values' in presentation tab, if needed.

Hope this helps,

Stefan

• ###### Problem on expression using <total> for calculating percent of time

It worked. Thank you very much!

• ###### Re: Problem on expression using <total> for calculating percent of time

Hi,

maybe this modification of your expression is what you are looking for:

Sum(HoursWorked)/sum( {1} total<Activities>HoursWorked)

Good luck!

Rainer

• ###### Problem on expression using <total> for calculating percent of time

Thank you Rainer.

• ###### Problem on expression using <total> for calculating percent of time

Hi,

i think you can solve my problem

i've dimemsions dim1,dim2,dim 3..in hierarchial format as in pivot table.

i've a value column in the table, as one expr....i'm showing sum(value) and i also have dimension due date....& if the due date <today() date then in the expr column Overdue Amt i simply show sum(value) else i'll show it the Not due column...this is fine....

now i've to find %Overdue & %Not due.....wich is Overdue Amt/sum(value) & Not Due Amt/sum(value) respectively...

i'm getting the % fine..for each row...but at the total level i dnt want to see sum of all % for Overdue & %Not Due

Bt only the sum of Overdue Amt/sum of Remainin Amt & same for %Not due as well

Plz help

stuck for 1 day cmplete

Regards