How do I retrieve the total sum for an enumlist column type that reference a table with user-defined values?

How do I get the total sum of prices when I select multiple items from a list?

There are prices associated with these descriptions on a different table, and Iโ€™d like to get the total of everything I selected. What is the best way to do this?

Solved Solved
0 4 208
1 ACCEPTED SOLUTION

โ€œcreate the list that used the โ€˜valid ifโ€™ constraintโ€, huh?

SUM( [EnumList][Price column] ) should work fine. If not, thereโ€™s something wrong.

I recommend using IN() instead of CONTAINS(), and properly using [_THISROW].

SUM( SELECT(
  Scenario Options[Estimated Project Cost] ,
  IN( [Project Description] , [_THISROW].[Select Scenario Options] )
) )

View solution in original post

4 REPLIES 4

Is the EnumList base type Ref?

Yea, I finally got it to work just nowโ€ฆ SUM(SELECT(Scenario Options[Estimated Project Cost], CONTAINS([Select Scenario Options],[Project Description])))

The Sum([Item][Price]) formula doesnโ€™t want to work when I create the list that uses the โ€œValid Ifโ€ constraint.

โ€œcreate the list that used the โ€˜valid ifโ€™ constraintโ€, huh?

SUM( [EnumList][Price column] ) should work fine. If not, thereโ€™s something wrong.

I recommend using IN() instead of CONTAINS(), and properly using [_THISROW].

SUM( SELECT(
  Scenario Options[Estimated Project Cost] ,
  IN( [Project Description] , [_THISROW].[Select Scenario Options] )
) )

Thanks.

Top Labels in this Space