Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a transaction table joined to a date table. The date table has a calculated "Week Start" column. I need a running total of Qty, by week, from the beginning of time. It's a mini-MRP solution, and I'm looking at inventory quantities, purchases orders and scheduled job consumption. I'm using the following measure:
Qty Demand:=VAR MaxDate = MAX ( 'Calendar'[WeekStart] ) -- Saves the last visible date
RETURN
CALCULATE (
SUM(MRP[TransQty]), -- Computes sales amount
FILTER(ALL('Calendar'),'Calendar'[Date] <= MaxDate) -- Where date is before the last visible date
)
However, it just hangs. Any suggestions?
Solved! Go to Solution.
Hi @jmillar ,
To calculate the running total, the source table needs a date column and create relationships with your Calendar table based on this case.
If the source table does not have a date column, the measure would just only calculate the sum value of all the source table fields.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @jmillar ,
To calculate the running total, the source table needs a date column and create relationships with your Calendar table based on this case.
If the source table does not have a date column, the measure would just only calculate the sum value of all the source table fields.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Qty Demand:=VAR MaxDate = MAX ( 'Calendar'[WeekStart] ) -- Saves the last visible date
RETURN
CALCULATE (
SUM(MRP[TransQty]), -- Computes sales amount
'Calendar'[Date] <= MaxDate -- Where date is before the last visible date
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.