4 Replies Latest reply: Feb 19, 2013 12:33 PM by Muhammad Altaf

# Comparing sum further within dimension

Hi

 ID UserName Planed Actual Dr 1 Khalid 2 1 A 2 Khalid 3 3 B 3 Khalid 4 3 C 4 Khalid 4 4 D 5 Khalid 4 0 E 4 Khalid 4 3 D

I have pivot table

UserName Sum(Planed) Sum(Actual)  in thir column I want the number of count of Dr whose Sum(Planed) <=Sum(Actual)

how can I achieve this.. sample files are attached

• ###### Re: Comparing sum further within dimension

Hi,

I didn't understood what you said exactly. Could you please explain clearly or else provide some sample output according to your requirement?

• ###### Re: Comparing sum further within dimension

sample out put of pivot table

User          No_Of_FullyAttended_Doctors

Khalid       1

for only one Dr B the condition sum(planed) <= sum(actual) is true.

 Dr sum(planed) sum(actual) Sum(Planed) - Sum(Actual) A 2 1 1 B 3 3 0 C 4 3 1 D 8 7 1 E 4 0 4

or in other words i need count of Dr where Sum(Planed) - Sum(Actual) <=0

• ###### Re: Comparing sum further within dimension

Hello,

Try this expression for fully visited.

=Count(If(Aggr(Sum(Planed),Dr)<=Aggr(Sum(Actual),Dr),Dr))

Hope it helps you.

Cheers!!

Jagan Nalla

• ###### Re: Comparing sum further within dimension

Thanks a lot it worked:)