Forum Discussion
Anonymous
5 years agoNot applicable
Return sum based on row entry
My dataset looks like the following: Item Segment Total sales Watermelon Expensive 100 Strawberry Expensive 200 Banana Cheap 300 Orange Cheap 200 I'd like to create a...
- 5 years ago
Anonymous
A variable can read the Segment and we can use that in the measure.
Segement Total = VAR _Segment = SELECTEDVALUE('Table'[Segment]) RETURN CALCULATE( SUM('Table'[Total sales]), ALLEXCEPT('Table','Table'[Segment]), 'Table'[Segment] = _Segment )
jdbuchanan71
5 years agoSuper User
Anonymous
A variable can read the Segment and we can use that in the measure.
Segement Total =
VAR _Segment = SELECTEDVALUE('Table'[Segment])
RETURN
CALCULATE(
SUM('Table'[Total sales]),
ALLEXCEPT('Table','Table'[Segment]),
'Table'[Segment] = _Segment
)
Anonymous
5 years agoNot applicable
Thank you so much! This is awesome.