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
Sum of all cash payments from the related orders:
SUM(
SELECT(
[Related Orders][Price],
("Cash" = [Payment Type])
)
)
User | Count |
---|---|
44 | |
31 | |
29 | |
14 | |
14 |