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 207
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