Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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))
Should that last comma (,) at the end of the formula (just before the multiple brackets )))))))) be there?
Hi!
Maybe not, but removing it does not change the result
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))