Forum Discussion
trsh3r
3 years agoFrequent Visitor
Rolling up a SUM calculation
Hi all I have a deceptively simple set of data, but trying to accomplish a calculation within a calculation and I've been stuck. Essentially I have a number of lines per employee stating their p...
- 3 years ago
Hi Neeko
Your proposed measure doesn't work, however I've found wrapping up Checksum in a simple new measure with SUMX does the trick.
SUMX( DATESBETWEEN (DATES[Date], MIN(DATES[Date]), MAX(DATES[Date]) ), [CheckSum] )Thank you for your reply!
Anonymous
3 years agoNot applicable
Hi trsh3r ,
Please try this measure.
CheckSum =
VAR vDaily =
CALCULATE(
SUM( Table[Billable] ),
FILTER(
Table,
COUNTROWS(
FILTER(
VALUES( DATES[Date] ),
Table[employee]=MAX(Table[employee]) &&
Table[Start] <= DATES[Date] && Table[End] >= DATES[Date]))
> 0))
RETURN
IF( vDaily > 0, vDaily, 0)
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
trsh3r
3 years agoFrequent Visitor
Hi Neeko
Your proposed measure doesn't work, however I've found wrapping up Checksum in a simple new measure with SUMX does the trick.
SUMX(
DATESBETWEEN (DATES[Date], MIN(DATES[Date]), MAX(DATES[Date]) ),
[CheckSum]
)Thank you for your reply!