Total/Subtotal of a row

Hello,

I am trying to follow this post to create a row that shows totals, but I'm a bit lost.

What I have:
Table Name: Devices
Columns: Serial Number / Device Type / Price1 / Price2
I want to show the total of "Price1" and "Price2" as a value in the table view

This is what I understand from the post:
1) In the table, I add a row with the value "Total" in the "Device Type" column.
2) I create an action "set the values of some columns in this row", formula:
Sum(Select(Devices[Price1], [Device Type]<>Total))
this one is accepted and it works
3) Then I create another action "execute an action on a set of rows"
Table: Devices
Ref Table: Devices
Ref rows - this is where I am struggling, according to the post, I can use something like
" select(TableName[ID],[Category]=โ€œTotalโ€) "
updated to match my data
" Select(Devices[Serial Number],[Device Type]="Total") "
This one gives me an error "The value of data action 'Subtotal' does not match the expected type List or its expected type details"

Usually the Ref Rows formula was a list of rows from a column, but I don't know how to add a condition to what this list should contain.

Can you please point me in the right direction? 

Thank you in advance!

0 3 379
3 REPLIES 3

Instead of:

Select(Devices[Serial Number],[Device Type]="Total") 

Try:

FILTER("Devices" , [Device Type] = "Total")

Ok, that was easier than I expected, I didn't consider using FILTER at all, my bad.

Thanks a lot for the quick and easy solution!

Hi razvan

I think i have solution for this one,

u add some expression in display name of your column,

for Price1 column u can use this:

Price1&" ("&text(sum(Devices[Price1]))&")"

Hope this helps you.

Top Labels in this Space