Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparing sum further within dimension

Hi

IDUserNamePlanedActualDr
1Khalid21A
2Khalid33B
3Khalid43C
4Khalid44D
5Khalid40E
4Khalid43D

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

thanks in advance.

1 Solution

Accepted Solutions
jagannalla
Partner - Specialist III
Partner - Specialist III

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

View solution in original post

4 Replies
manideep78
Partner - Specialist
Partner - Specialist

Hi,

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

Not applicable
Author

Thanks for reply...

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)
A211
B330
C431
D871
E404

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

jagannalla
Partner - Specialist III
Partner - Specialist III

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

Not applicable
Author

Thanks a lot it worked:)