Forum Discussion

dokat's avatar
dokat
Post Prodigy
4 years ago
Solved

Sum Based on Slicer Date Selection

Hi,

 

I have matrix table i'd like to dynamically calculate measure based on date selection in slicer. I added a new column in the data table and called it "Slicer Dates'. I have a calendar Year column and Slicer Dates is added based on the values in Calendar Year column.

 

Slicer have 3 options. Last Month, Last Year and Year to Date

 

I have below forumula to sum values based on slicer date selection however it is giving me an error. Can anyone help with TY and LY (Last Year) calculation.

 

TY = Calculate(SUM('P&L'[Values]),
FILTER('P&L'[Slicer Dates] = ALLSELECTED('P&L'[Slicer Dates)))))

2 Replies