Forum Discussion
Calculate sum for specific period and difference between same period of previous year
- Anonymous9 years ago
hi kpangelinan
Try the following
Assumptions: The calendar table and the dataTable are linked on the date columns of respective tables.
You also have a column in Calendar Table for YearMonth
1. Create a measure called ARRTotal = sum(datatable[ARRAmount]).
2. For Previous Year Same Period create the measure
ARRPrYr = Calculate([ARRTotal],SAMEPERIODLASTYEAR('Calendar'[Date]))
3. Now plot a Table visual with
a) YearMonth column from calendar table
b) Measure ARRTotal
c) Measure ARRPrYr
You should be able to see the result you expect.
If this solves your issue please accept this as a solution and also give KUDOS.
Cheers
CheenuSing
hi kpangelinan
Try the following
Assumptions: The calendar table and the dataTable are linked on the date columns of respective tables.
You also have a column in Calendar Table for YearMonth
1. Create a measure called ARRTotal = sum(datatable[ARRAmount]).
2. For Previous Year Same Period create the measure
ARRPrYr = Calculate([ARRTotal],SAMEPERIODLASTYEAR('Calendar'[Date]))
3. Now plot a Table visual with
a) YearMonth column from calendar table
b) Measure ARRTotal
c) Measure ARRPrYr
You should be able to see the result you expect.
If this solves your issue please accept this as a solution and also give KUDOS.
Cheers
CheenuSing
- kpangelinan9 years agoHelper I
Anonymous That worked perfectly! Thank you very much for your help.