Forum Discussion
cmfb
4 years agoFrequent Visitor
Cumulative measure based on multiplied values, changing when multiplier updates
Hello - I have a need to calculate the cumulative production $ value by item, which is the production output by month multiplied by the average item sales price for the month. The issue is creating ...
- 4 years ago
cmfb , Make sure the month year in the table is coming from the calendar table and the join is single directional.
Try like
CALCULATE(
Sumx(SUMMARIZE('Item', 'Item'[Item No],
"Qty", [Production Quantity],
"Avg Price", [Average Item Price]), [Qty]*[Avg Price]),
FILTER(ALL('Calendar'),
'Calendar'[Date] <= max('Calendar'[Date]) )
)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 - 4 years ago
cmfb
4 years agoFrequent Visitor
This works great -
SUMX(SUMMARIZE(CALCULATETABLE(VALUES('Calendar'[YYMM NUM]),DATESBETWEEN('Calendar'[Date],minx(all('Calendar'),'Calendar'[Date]),max('Calendar'[Date]))),'Calendar'[YYMM NUM],"ABCD",[Production Value]),[ABCD])
Thanks so much Ashish_Mathur - can I ask how you got the file size to be so much smaller than the original?
Ashish_Mathur
Super User
4 years agoYou are welcome. I did not do anything to reduce the file size.