Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello , as per the below screenshot i am trying to create a graph where i can show the Y-1 values as well as the last 12 months values however i am unable to remove the previous periods from the graph with a slicer or with filters, when i do so i lose the values for Y-1, can anyone possibly assist me with this? Many thanks
@Anonymous , Based on what I got , a measure like this should help
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))
Hello Amtichandak, indeed i have used the second formula you have mentioned however what i am looking to do i hide the 2020 values on my x axis and i am unable to do so with filtering or slicing as this will remove the values on the orange line (the Y-1 line)
Hi @Anonymous ,
Which field of which table is applied to the x-axis on your line chart visual? Is it from the date dimension table? Is it possible to try to apply a visual-level filter in Filters panel with the condition (date>=2021.1.1)?
If the above one is not working, please provide some data of involved tables which applied on the line chart visual and the Fields setting of line chart visual. And please also share the related formulas if it involve any measure. Thank you.
Best Regards
@Anonymous , For that use a year slicer
Or filter using a column like
Year Type = Switch( True(),
year([Date])= year(Today()),"This Year" ,
year([Date])= year(Today())-1,"Last Year" ,
Format([Date],"YYYY")
)