Forum Discussion
Running Comparion to previous year
- 7 years ago
Glad to hear that. You may help accept the solution above. Your contribution is highly appreciated.
Hi,
The SUMX is not required. Try these measures:
RT_Volume = SUM(SALESLINE[NEW VOLUME])
PY RUNNING TOTAL = CALCULATE([RT VOLUME],SAMEPERIODLASTYEAR('DATE'[Date]))
There should be a relationship from the Date column of the Salesline Table to the Date column of the Date Table.
Hope this helps.
Hi Ashish
Thanks for the reply but just a question before I go ahead.
If I use RT_Volume = SUM(SALESLINE[NEW VOLUME]) will that not add all the volumes and not just the ones for this financial year?
Don't I need this filter so I don't return all volumes since the very first delivery date?
- Ashish_Mathur7 years agoSuper User
Hi,
Create 2 slicers for Year and Month (both from the Date Table) and select a certain year/month. Try this measure
RT_Volume = CALCULATE(SUM(SALESLINE[NEW VOLUME]),DATESYTD(Date[Date],"31/3")
The other measure will remain the same.
- Qualube7 years agoHelper II
Hi Ashish
Finally solved it I think it was to do with my initial evaluation context anyway I have addressed that and created the following measure
PY VOLUMES = IF(LASTDATE('DATE'[Date]) > TODAY(), BLANK(),
CALCULATE( [YTD VOLUMES], DATEADD('DATE'[Date],-1,YEAR)))Which has given me a running total that updates automatically.
Thanks for your help.
- v-chuncz-msft7 years agoCommunity Support
Glad to hear that. You may help accept the solution above. Your contribution is highly appreciated.