Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello, I want to be able to filter a chart to show the last 9 fiscal quarters so we can compare the current quarter with the the same quarter in the past two years. The filter pane doesn't allow quarterly and if I do monthly then it's always cutting off part of the quarter furthest in the past. In the example below the filter is missing Jan and Feb 2022 of Q4 2021/22
Is there a way to add a dynamic filter so I don't need to do in and update the filter every quarter?
Solved! Go to Solution.
I've managed to get it working with a silghtly edited version of your code:
Display Data = if([Year]>=(Year(TODAY())-1),"Display",if(and(Quarter([Date])>=Quarter(today()),[Year]>=(Year(TODAY())-2)), "Display", "Do Not Display"))
Thanks
Hello,
You can add a slicer to the page and inclued in the slicer the "Date Prevention" Heirarchy. Then you can just select the years and quarters you would like displayed.
Hi Kaylastarr, I've done that as a temporary solution but it still involves me going into the desktop file and changing the slicer every quarter. I want to avoid that.
If you want a more complicated method you can add a calulated column to your table to check if the data should be displayed and then filter it by that.
Something like.
Display Data = if(Year(date)>=(Year(today())-1),"Display",If(and(Quarter(date)>=Quarter(today()),Year(date)>=(year(today())-2), "Display", "Do Not Display")
You may have to adjust it a bit depending on which exact quarters you want to display buts thats the jist.
I've managed to get it working with a silghtly edited version of your code:
Display Data = if([Year]>=(Year(TODAY())-1),"Display",if(and(Quarter([Date])>=Quarter(today()),[Year]>=(Year(TODAY())-2)), "Display", "Do Not Display"))
Thanks