We get the totals right for all the months, but the values displayed within the table (row level) are not. What are we doing wrong? What are we missing on?
Total of the very bottom # of $451.40 is incorrect for Current, correct? You will definitely need to use a measure that has SUMX and Summarize in it to correct the totals. Same has done a video here to help correct measure totals.
This is not as simple as it may appear. One issue is the relationship between your Sales & Dates Table. There is no reason for it to be both. Best practice is Single. Here are steps to solve.
Create Measure For Days Since Confirmed-
Days Since Confirmed Date =
VAR LastConfirmedDate =
LASTDATE ( Sales[Confirmed Date] )
RETURN
DATEDIFF ( LastConfirmedDate, TODAY (), DAY )
Then Create measures for each of your standards. Here is example for current:
Current =
CALCULATE (
[Total Quantity],
FILTER ( Sales, [Days Since Confirmed Date] < 30 )
)
Here is example for 30:
30 Days JRM =
CALCULATE (
[Total Quantity],
FILTER (
Sales,
[Days Since Confirmed Date] > 29
&& [Days Since Confirmed Date] <= 59
)
)
Thanks for the help again. We have noticed that the dates overlap. The date for the current month shows Feb dates within the same column for March period, same with Feb month showing Jan dates. What are we missing here? Any input would be much appreciated.
Sorry for the late response, but I have been out of the office at a conference all week. Just returning today, and will have a look at this over the weekend.
Sorry for so late getting back to you, been crazy busy since getting back from the conference last week. Having a look at your file and the reason why those dates are showing in current month is In the measure for current month it is including anything with a confirmed date < 30 days. If this is not how you want to calculate this, then let me know how you would like it calculated.
Thanks for getting back to me on this. We want it to calculate for individual months for the last six months, i.e, qty sold in March, Feb, Jan, Dec, Nov, Oct. When April comes Oct month should drop off. Hope it can be achieved.