Forum Discussion
Related filtering with years
- Anonymous8 years ago
The following measure should work:
OriginSales =
VAR SlicerYear =
SELECTEDVALUE ( CalendarTable[Year] )
RETURN
CALCULATE ( [TotSales], SalesTable[Origin Year] = SlicerYear )We create a variable called SlicerYear that stores the current value from the slicer.
We then modify the filter context by using CALCULATE(), and specify that we want SalesTable[OriginYear] to equal the stored SlicerYear value.
All the best,
~ Chris H
Hi,
I do not get it. How did 13,061 comes about. Does number 4 represent January?
- Anonymous8 years agoNot applicable
Hi Ashish -
I don't think that 2nd image actually corresponds to the number 13,061. I believe the OP meant that the filter context generated by his / her slicers was returning the larger box. However, the desired result is only a subset of that filter context, such that the Origin Year column matches the Year value from the slicer.
I believe my measure posted previously will accomplish this.
- jpereztang8 years agoHelper I
Hi Ashish_Mathur Anonymous
Sorry for mistake this is what i get when select Jan 2017
Finally i could get the value.
Thanks a lot !