Forum Discussion
Prabha45
Helper III
3 years agoYearly sales based on selection
I have two slicers site and period(Year, month) and a matrix having categories, sub categories as rows and sales as values. Now I need to create a dax where it shows total year sales of sub categorie...
- 3 years ago
Hi Prabha45 ,
According to your description, you need to calculate the annual sales of the subcategories based on the selection of the slicer, and ignore the influence of the month.
You can try this measure:
SALES = CALCULATE(SUM(SALES[Amount]),FILTER(ALL(SALES),SALES[DATE].[Year] = MAX(SALES[Product].[Year])))If this is not what you need, please provide sample data to address further.
Best Regards,
Gallen Luo
v-jialluo-msft
Community Support
3 years agoHi Prabha45 ,
According to your description, you need to calculate the annual sales of the subcategories based on the selection of the slicer, and ignore the influence of the month.
You can try this measure:
SALES = CALCULATE(SUM(SALES[Amount]),FILTER(ALL(SALES),SALES[DATE].[Year] = MAX(SALES[Product].[Year])))
If this is not what you need, please provide sample data to address further.
Best Regards,
Gallen Luo
Prabha45
Helper III
3 years agoThank you that worked