Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
stekol61
Creator
Creator

Calculated dimension

 

Hi!

I have a table with all needed dimension and three Cost calculation measures (first screenshot).
The calculation for 'Total Cost' is something like this:
If (Actual_cost)>0 then
Cost = Actual cost
else
Cost = Est cost)

When I use the same calculation in a table without any dimension the result is different and not correct (see Total Cost) (second screenshot).

The calculation I used for Total cost is:

if (Sum([Total cost])>0, Sum([Total cost]),
(If (wor_AssignmentProfile ='Eltel - FS - SE - B2B',Sum([Eltel SWE]),
If (wor_AssignmentProfile ='Eltel - FS - FIN - B2B',Sum([Eltel FI]),
If (wor_AssignmentProfile ='Eltel - FS - LT - B2B',Sum([Eltel LI]),
If (wor_AssignmentProfile ='Boftel - FS - EE - B2B',Sum([Boftel]),
If (wor_AssignmentProfile ='Empower - FS - FI - B2B',Sum([Empower]),
If (wor_AssignmentProfile ='Ericsson - FS - SE - B2B',Sum([Transtema]),
If (wor_AssignmentProfile ='Reijlers - FS - NO - B2B',Sum([OneCo]),)))))))))

How can this be solved?


Dim1.PNG

Dim2.PNG 

1 Solution

Accepted Solutions
sunny_talwar

What all dimensions do you have here? You can try something like this

Sum(Aggr(

If(Sum([Total cost]) > 0, Sum([Total cost]),
(If(wor_AssignmentProfile ='Eltel - FS - SE - B2B',Sum([Eltel SWE]),
If(wor_AssignmentProfile ='Eltel - FS - FIN - B2B',Sum([Eltel FI]),
If(wor_AssignmentProfile ='Eltel - FS - LT - B2B',Sum([Eltel LI]),
If(wor_AssignmentProfile ='Boftel - FS - EE - B2B',Sum([Boftel]),
If(wor_AssignmentProfile ='Empower - FS - FI - B2B',Sum([Empower]),
If(wor_AssignmentProfile ='Ericsson - FS - SE - B2B',Sum([Transtema]),
If(wor_AssignmentProfile ='Reijlers - FS - NO - B2B',Sum([OneCo]),)))))))))

, ChartDimensionsFromYourFirstImageHere))

 

View solution in original post

3 Replies
alexis
Partner - Specialist
Partner - Specialist

Should that last comma (,) at the end of the formula (just before the multiple brackets )))))))) be there?

 

stekol61
Creator
Creator
Author

Hi!

Maybe not, but removing it does not change the result

sunny_talwar

What all dimensions do you have here? You can try something like this

Sum(Aggr(

If(Sum([Total cost]) > 0, Sum([Total cost]),
(If(wor_AssignmentProfile ='Eltel - FS - SE - B2B',Sum([Eltel SWE]),
If(wor_AssignmentProfile ='Eltel - FS - FIN - B2B',Sum([Eltel FI]),
If(wor_AssignmentProfile ='Eltel - FS - LT - B2B',Sum([Eltel LI]),
If(wor_AssignmentProfile ='Boftel - FS - EE - B2B',Sum([Boftel]),
If(wor_AssignmentProfile ='Empower - FS - FI - B2B',Sum([Empower]),
If(wor_AssignmentProfile ='Ericsson - FS - SE - B2B',Sum([Transtema]),
If(wor_AssignmentProfile ='Reijlers - FS - NO - B2B',Sum([OneCo]),)))))))))

, ChartDimensionsFromYourFirstImageHere))