Forum Discussion
MaryGraceP
9 months agoNew Member
Sum for each Different Job Number
I created the "POUNDS OUT" measure (see code below) which I want to equal the sum of the column Perfection for each Job when WIP/ING/PKG is equal to "Line". The way I have the measure set up, it...
- 9 months ago
Hi MaryGraceP,
COuld you please try with below DAX
POUNDS OUT = VAR CurrentJob = SELECTEDVALUE('Yield Table'[job]) RETURN CALCULATE( SUM('Yield Table'[Perfection]), FILTER(ALL('Yield Table'), 'Yield Table'[job] = CurrentJob && 'Yield Table'[WIP/ING/PKG] = "Line" ) )Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.
MasonMA
9 months agoSuper User
Thie simpler way is using KEEPFILTERS to wrap over the filter context.
Measure2 =
CALCULATE(
SUM('Table'[Perfection]),
KEEPFILTERS('Table'[WIP/ING/PKG] = "Line")
)