Forum Discussion
Latest Month value
- Anonymous8 years ago
You'll need to write a measure to handle this.
Here is a simple way to do it:
Use a calculated column to get your month date. This would be something like:
MonthDate = DATE(YEAR([DateField]), MONTH([DateField]), 1)
where [DateField] is the name of the column that holds the finacial details date.
Next create a measure that does this:
Last Month Sum = VAR endDate = LASTDATE('YourTable'[MonthDate]) END CALCULATE( SUM('YourTable'[BudgetValue]), 'YourTable'[MonthDate] = endDate )Please note that this measure will take into consideration the context of your report filters. If you use a Date slicer and contrain the report, the last month will always been the last month within your Date contraints.
You'll need to write a measure to handle this.
Here is a simple way to do it:
Use a calculated column to get your month date. This would be something like:
MonthDate = DATE(YEAR([DateField]), MONTH([DateField]), 1)
where [DateField] is the name of the column that holds the finacial details date.
Next create a measure that does this:
Last Month Sum = VAR endDate = LASTDATE('YourTable'[MonthDate])
END
CALCULATE(
SUM('YourTable'[BudgetValue]),
'YourTable'[MonthDate] = endDate
)
Please note that this measure will take into consideration the context of your report filters. If you use a Date slicer and contrain the report, the last month will always been the last month within your Date contraints.
Thanks . It's working fine