Forum Discussion

rpinxt's avatar
rpinxt
Solution Sage
2 years ago
Solved

Calculating on Parameter fields

I have a parameter field :

Now based on the selection I want to make calculations.

I have this :

FTE Outbound = IF(MAX(PrmOutbUnits[PrmOutbUnits]) = "Outbound Direct",
CALCULATE([FTE],'AVN MD CC'[Cost Center] = "875001"),
IF(MAX(PrmOutbUnits[PrmOutbUnits]) = "Outbound Export",
CALCULATE([FTE],'AVN MD CC'[Cost Center] = "875147"),
CALCULATE([FTE],'AVN MD CC'[Cost Center] = "875001") + CALCULATE([FTE],'AVN MD CC'[Cost Center] = "875147")
))
 
If I select only 1 it works perfectly.
However if none are selected or both are selected I would expect it to do the aggregation of both.
But it is not, it then always shows the FTE of Export.
 
Where am I going wrong here?
  • Nevermind...should not have used MAX.

    Now use selectedvalue and it works.

     

    But you have to make an extra column in your parameter table being a copy of the first field (PrmOutbUnits), I named it "PrmOutbName".

    The first field you cannot use because of the composite error you then get.

    With the new column you will not have this problem.

1 Reply

  • rpinxt's avatar
    rpinxt
    Solution Sage

    Nevermind...should not have used MAX.

    Now use selectedvalue and it works.

     

    But you have to make an extra column in your parameter table being a copy of the first field (PrmOutbUnits), I named it "PrmOutbName".

    The first field you cannot use because of the composite error you then get.

    With the new column you will not have this problem.