Forum Discussion
Dan_W
8 years agoFrequent Visitor
Sum based on filters
Hi, I have data comprised of running totals that looks like below and I'm trying to find totals for the asset when filtering for asset and dates. DATE ASSET QTY
1/1/18 12:00 AM B 1
1/1/18 1:1...
- Anonymous8 years ago
Dan_W,
Please check if the following DAX returns your expected result. If not, please share source file via OneDrive.Grand Total = var MaxValue = MAX(Sheet1[QTY]) var MinValue = MIN(Sheet1[QTY]) var Interval Total = MaxValue - MinValue Return SUMX( CALCULATETABLE( ALLSELECTED(Sheet1[ASSET])), Interval Total)
Regards,
Lydia - 8 years ago
Thank you Lydia -your suggestion worked perfectly.
Anonymous
8 years agoNot applicable
Dan_W,
Please check if the following DAX returns your expected result. If not, please share source file via OneDrive.
Grand Total = var MaxValue = MAX(Sheet1[QTY])
var MinValue = MIN(Sheet1[QTY])
var Interval Total = MaxValue - MinValue
Return
SUMX(
CALCULATETABLE(
ALLSELECTED(Sheet1[ASSET])),
Interval Total)
Regards,
Lydia
Dan_W
8 years agoFrequent Visitor
Thank you Lydia -your suggestion worked perfectly.