Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
heij1421
Partner - Creator
Partner - Creator

Help with Formula to calculate total with conditions

Attached you find this dashboard

In the last graph I need an additional column. The calculation should be the sum of the red box in case of the first line.

This is the total amount of 'Team Cor' except where 'team cor' (linked to cost center of a project) <> team cor (linked to cost center of an employee).

How do I do that?

5 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

I suggest that you reduce the data in your upload. I will not open 65MB file to see if can help you.

Preparing examples for Upload - Reduction and Data Scrambling

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
heij1421
Partner - Creator
Partner - Creator
Author

Jonathan, I already reduced the data using the 'reduce data - keep possible values' option.

jonathandienst
Partner - Champion III
Partner - Champion III

OK, but I suggest that you reduce it still further...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
heij1421
Partner - Creator
Partner - Creator
Author

I figured it out myself.

Solution:

=SUM(AGGR(IF([Projects CostCenterDescription]=[Employee CostCenterLabel],SUM(Total <[Employee CostCenterLabel]>[Projectactuals RealQuantityCosts] * [Item Sales Package Price])-SUM([Projectactuals RealQuantityCosts] * [Item Sales Package Price])),[Projects CostCenterDescription], [Employee CostCenterLabel]))

heij1421
Partner - Creator
Partner - Creator
Author

I figured it out myself.

Solution:

=SUM(AGGR(IF([Projects CostCenterDescription]=[Employee CostCenterLabel],SUM(Total <[Employee CostCenterLabel]>[Projectactuals RealQuantityCosts] * [Item Sales Package Price])-SUM([Projectactuals RealQuantityCosts] * [Item Sales Package Price])),[Projects CostCenterDescription], [Employee CostCenterLabel]))