Forum Discussion
Filter amounts by year
- 5 years ago
Hi Anonymous ,
There is option to create disconnected table.
Example: create new table which will have values 2017, 2018, 2019. This table must not have any connection to existing table where you have measures.
In slicer use Year from this new disconnected table.
Now create these 2 measures:Current Year =var _currentYear = SELECTEDVALUE('Year'[Year])RETURN CALCULATE(SUM('Table'[Amount]),FILTER('Table','Table'[ImpYear]=_currentYear))Past Year =var _previousYear = SELECTEDVALUE('Year'[Year])-1RETURN CALCULATE(SUM('Table'[Amount]),FILTER('Table','Table'[ImpYear]=_previousYear))Regards,
Nemanja Andic
Hi Anonymous ,
There is option to create disconnected table.
Example: create new table which will have values 2017, 2018, 2019. This table must not have any connection to existing table where you have measures.
In slicer use Year from this new disconnected table.
Now create these 2 measures:
Regards,
Nemanja Andic
Hello nandic ,
Thank you for your response! I also wanted to calculate the 'Change YTD', which also be based on the year that will be chosen from the filter. My current DAX query looks like: