Forum Discussion
DAX Expression - Field Heirarchy
- 6 years ago
Hi Anonymous ,
You could try to add filter like the formula below.
Measure = CALCULATE(SUM('Table'[ Sales]),FILTER('Table','Table'[Date].[Year] = 2018))Otherwise, you could create a new column of "YEAR" and then use it to filter.
YEAR = YEAR('Table'[Date]) Measure 2 = CALCULATE(SUM('Table'[ Sales]),FILTER('Table','Table'[YEAR] = 2018))If I understand incorrectly, please share some sample data and your expected results. Then we will unerstand clearly.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.
Hi Anonymous ,
You could try to add filter like the formula below.
Measure = CALCULATE(SUM('Table'[ Sales]),FILTER('Table','Table'[Date].[Year] = 2018))
Otherwise, you could create a new column of "YEAR" and then use it to filter.
YEAR = YEAR('Table'[Date])
Measure 2 = CALCULATE(SUM('Table'[ Sales]),FILTER('Table','Table'[YEAR] = 2018))
If I understand incorrectly, please share some sample data and your expected results. Then we will unerstand clearly.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.