Forum Discussion
SamePeriodLastYear() - Visual Level Filters
- Anonymous7 years agoNot applicable
I'll try again... This time on IE which allows me to upload photos, when Chrome and Edge don't?
Anyway, many thanks for the response.
My data looks like this and has a measure value for each year:
This appears to only work when Cross filter direction is set to Single.
When I select 2020 from the slicer, my tables shows as expected the previous year values for 2019. This is because SAMEPERIODLASTYEAR is used in the measure MeasureSPLY.
My question is, if I want to filter this further using Visual Filters, is there anyway to see the previous Year values shown in the table?
Since the only values available in the Visual Filter are the 2020 values?
Hope this makes sense.
Many thanks
- v-lili6-msft7 years agoCommunity Support
hi, Anonymous
Since SamePeriodLastYear is a time-intelligence function, It needs a date time, and all the time dimension should from
date table. from your screenshot we could know that date, DimensionA, DimensionB is from data table. It couldn't be done
by this. DimensionA, DimensionB should be defined in date table.
In the visual, they should be "Tag attributes" not "time dimension". and when you filter current context you could see current context data. for example: when you filter 2020, you could only see data in 2020, and use SamePeriodLastYear is just retrun 2019 data for 2020.
Here are some documents for your reference:
http://www.statslab-bi.co.nz/project/row-filter-context-dax/
Best Regards,
Lin