The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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")
)