The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I m trying to get cumulative total of "Forecast Gross" once "Closing stock" end e.g. Last Closing stock date is 18/03/24 so Forecast should start cumulating from 18/03, I was able to calculate demand after last closing stock date but it is not cumulating. below is the measure.
Demand Cumulative:=VAR LastClosingStk = CALCULATE(MAX([Transaction Date]),'Date'[DateWithSales] = TRUE,ALL('Date'))
VAR Result = CALCULATE([Forecast Gross],FILTER('Date','Date'[Date]>=LastClosingStk))
Return Result
https://1drv.ms/x/s!Agco7LD2yJqrpXn-v3X8sw9g36vt
Solved! Go to Solution.
Hi @adsam,
Try to update your measure like this :
Demand Cumulative:=
VAR LastClosingStk = CALCULATE(MAX([Transaction Date]),'Date'[DateWithSales] = TRUE,ALL('Date'))
VAR CurrentDate = MAX('Date'[Date])
RETURN
CALCULATE(
[Forecast Gross],
FILTER(
ALL('Date'),
'Date'[Date] <= CurrentDate && 'Date'[Date] >= LastClosingStk
)
)
Thanks it worked
Hi @adsam,
Try to update your measure like this :
Demand Cumulative:=
VAR LastClosingStk = CALCULATE(MAX([Transaction Date]),'Date'[DateWithSales] = TRUE,ALL('Date'))
VAR CurrentDate = MAX('Date'[Date])
RETURN
CALCULATE(
[Forecast Gross],
FILTER(
ALL('Date'),
'Date'[Date] <= CurrentDate && 'Date'[Date] >= LastClosingStk
)
)
User | Count |
---|---|
25 | |
10 | |
8 | |
7 | |
6 |
User | Count |
---|---|
32 | |
12 | |
10 | |
10 | |
9 |