Forum Discussion
awitt
7 years agoHelper III
Sort filtered column by another column value.
How do i seperate the far right column to show the sum per order # instead of the total for both? All of the values in "Column" for Order# 10001 should be 10 and 10002 should be 12.
- Anonymous7 years ago
Try this :
Column = CALCULATE(SUM(Table1[Revenue]),ALL(Table1), Table1[Order#]= EARLIER(Table1[Order#]), Table1[Item Version]="S")
Thanks
Raj
Anonymous
7 years agoNot applicable
What about this?
Column =
CALCULATE (
SUM ( Sheet2[Per Item Revenue] ),
FILTER (
ALL ( Sheet2 ),
Sheet2[Item Version] = "s"
&& EARLIER ( Sheet2[Order #] )
)
)If that doesn't work, try removing the ALL function:
Column =
CALCULATE (
SUM ( Sheet2[Per Item Revenue] ),
FILTER ( Sheet2, Sheet2[Item Version] = "s" && EARLIER ( Sheet2[Order #] ) )
)
awitt
7 years agoHelper III
That's what I had. :/
- Anonymous7 years agoNot applicable
Ok, try removing the ALL function. I had an alternate formula in my last post (I added it as an edit), see if that works.
- awitt7 years agoHelper III
Still getting the total revenue for all "s" revenue instead of it sorting by Order #.
- Anonymous7 years agoNot applicable
Got it (I think):
Column = CALCULATE ( SUM ( Sheet2[Per Item Revenue] ), FILTER ( Sheet2, Sheet2[Order #] = EARLIER ( Sheet2[Order #] ) && Sheet2[Item Version] = "S" ) )