Forum Discussion
Comulative shipments with filter
Hi, I would calculate a cumulative shipment for a product.
I use the following formula, but it gives me not the cumulative but only the shipment by month.
CumulativeShipBATT =
VAR comcares =
CALCULATE (
SUM ( Shipments[Qty] ),
FILTER ( Shipments, Shipments[Family_ID] = "A" ),
FILTER ( ALL ( DateTable ), DateTable[Date] <= MAX ( DateTable[Date] ) )
)
RETURN
comcares
Can you indicate to me where I'm wrong?
Thank you
Ortignano , If you are using month year from date table in visual it should come fine
or try like
CumulativeShipBATT =
VAR comcares =
CALCULATE (CALCULATE (
SUM ( Shipments[Qty] ),
FILTER ( Shipments, Shipments[Family_ID] = "A" ) ) ,
FILTER ( ALL ( DateTable ), DateTable[Date] <= MAX ( DateTable[Date] ) )
)
RETURN
comcaresCheck these reasons
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
1 Reply
- amitchandakSuper User
Ortignano , If you are using month year from date table in visual it should come fine
or try like
CumulativeShipBATT =
VAR comcares =
CALCULATE (CALCULATE (
SUM ( Shipments[Qty] ),
FILTER ( Shipments, Shipments[Family_ID] = "A" ) ) ,
FILTER ( ALL ( DateTable ), DateTable[Date] <= MAX ( DateTable[Date] ) )
)
RETURN
comcaresCheck these reasons
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.