Hey Everyone,
I have a table full of rows and Im trying to get the sum of rows that are related to other rows.
This is my formula right now.
SUM(
SELECT(
Wrapper Leg 1[Leg #1 Counter],
AND(
([Date] = This_[Date]),
([CustomerType] = [CustomerType])
),TRUE
)
)
Im trying to get the sum of rows from the Leg 1 counter that have the same Date and customer Type.
Its either adding all the rows together or just throwing me errors. Ive tried many things.
Solved! Go to Solution.
Because of a quirk with the is-equal-to operator (=
), it may make a difference which operand is on the left and which is on the right. Try this:
SUM(
SELECT(
Wrapper Leg 1[Leg #1 Counter],
AND(
[_THISROW].[Date] = [Date],
[_THISROW].[CustomerType] = [CustomerType]
)
)
)
Ive also tried this,
This doesnโt work either, still adding up all rows for some items, and none for others.
SUM(
SELECT(
Wrapper Leg 1[Leg #1 Counter],
AND(
[Date] = [_THISROW].[Date],
[CustomerType] = [_THISROW].[CustomerType]
)
)
)
Because of a quirk with the is-equal-to operator (=
), it may make a difference which operand is on the left and which is on the right. Try this:
SUM(
SELECT(
Wrapper Leg 1[Leg #1 Counter],
AND(
[_THISROW].[Date] = [Date],
[_THISROW].[CustomerType] = [CustomerType]
)
)
)
Same Results. :(.
Adding all rows for some items and giving an output of 0 for others.
Are you willing to share a screenshot of a sample of the Wrapper Leg 1 spreadsheet?
Its working Steve.!! , Cant believe it but just realized I was calling the wrong table. Thanks for pointing that out. man.
User | Count |
---|---|
43 | |
28 | |
23 | |
14 | |
14 |