Help with Sum of Ref Rows dependent on answer

Good afternoon community,

Hope everyone is having a good day so far.

I have a parent table(Day) and I have two columns ,[Total Cash],[Total Credit] where I would like to do a sum of the ref rows [Price] column, one dependent on whether a column [Payment Type] in the child table's(Orders) columns answer (Enum) is "Cash" or "Credit".

I know how to SUM([Related Orders][Price]) but I'm unsure on how to do it, if its dependent on something?

How do I put this expression together

0 1 58
1 REPLY 1

Steve
Platinum 4
Platinum 4

Sum of all cash payments from the related orders:

SUM(
  SELECT(
    [Related Orders][Price],
    ("Cash" = [Payment Type])
  )
)
Top Labels in this Space