Forum Discussion
petercowen
6 years agoFrequent Visitor
Converting SUMIF latest v previous dataset in same table
I need some help converting a simple excel sumif in to the correct DAX equation I have a single table that contains multiple weeks worth of data and I want to be able to compare the week's quanti...
- 6 years ago
Hi, petercowen
According to your description, you can try measure like that:
Last week Qty = CALCULATE ( SUM ( 'Table'[Qty] ), FILTER ( ALLEXCEPT ( 'Table', 'Table'[Material] ), 'Table'[Week No] = MAX ( 'Table'[Week No] ) - 1 ) )Here is a sample I made:
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-easonf-msft
Community Support
6 years agoHi, petercowen
According to your description, you can try measure like that:
Last week Qty =
CALCULATE (
SUM ( 'Table'[Qty] ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Material] ),
'Table'[Week No]
= MAX ( 'Table'[Week No] ) - 1
)
)Here is a sample I made:
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.