Sum selected Enumlist to another column

Hi, I need help with this problem.

I need to sum the values of an Enumlist. The main column (the one with the Enumlist) is "Services to Perform" and two more depend on it: "Total Service Time" and "Price".

Screenshot 2024-04-17 18.13.12.png

Screenshot 2024-04-15 15.51.23.png

Also, I someone can help me with this yellow triangle!

Thanks a lot!

 

Solved Solved
0 3 71
1 ACCEPTED SOLUTION

I assume your "Services to Perform" is an EnumList with a subtype of Ref.  Correct?  We don't know which table you are referencing so I'll just call it "Other Table"

To sum the values from the other table, you need to use an expression like this:

SUM(SELECT(Other Table[Total Service], IN(["Other Table Key"], [Services to Perform])))

For the Price Sum just swap "Total Service" with "Price" 

The yellow triangle is a warning indicator that you are not returning the corerct values for the drop down list.  When the columns is of Ref type. whether it is the main type or it is a subtype,  the expression MUST MUST MUST return the key column of that other table.

To show the values like in your image, you need to set that  column in the "Other Table" as the Label column.  For example, in the "Horas Solicitas" table, you have the column Fecha set as the Label column.  IN the "Other Table", you need to set as the Label, the column that contains the values of "Lavado" and "Brushing".

I hope this helps!

View solution in original post

3 REPLIES 3

I assume your "Services to Perform" is an EnumList with a subtype of Ref.  Correct?  We don't know which table you are referencing so I'll just call it "Other Table"

To sum the values from the other table, you need to use an expression like this:

SUM(SELECT(Other Table[Total Service], IN(["Other Table Key"], [Services to Perform])))

For the Price Sum just swap "Total Service" with "Price" 

The yellow triangle is a warning indicator that you are not returning the corerct values for the drop down list.  When the columns is of Ref type. whether it is the main type or it is a subtype,  the expression MUST MUST MUST return the key column of that other table.

To show the values like in your image, you need to set that  column in the "Other Table" as the Label column.  For example, in the "Horas Solicitas" table, you have the column Fecha set as the Label column.  IN the "Other Table", you need to set as the Label, the column that contains the values of "Lavado" and "Brushing".

I hope this helps!

Hi, thanks!

Services to Perform" is an EnumList with a subtype of Ref to table "Servicios"

Yeyo1976_0-1713446056319.png

About ""Other Table Key" do you mean "ID_Servicios"

Yeyo1976_1-1713446209588.png

I try with the formula and

Yeyo1976_2-1713450187589.png

 

Thanks in advance!

 

There should have been a comma after [ID_Sericios].  I missed it in my original post and just now edited it.

Top Labels in this Space