Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Power BI Fam,
I am looking to automate my reporting as much as I can, I'm having trouble with automating slicers so that they show only all quarters excluding the current quarter (Screenshots attached). How would you automate this?
I have to right click and exclude the quarter I don't want but some measure/automation would be ideal. Thanks
Solved! Go to Solution.
Hi @agd50 ,
I created a sample pbix file(see the attachment), please check if that is what you want.
1. Create a measure as below
Flag =
VAR _date =
SELECTEDVALUE ( 'Date'[Date] )
RETURN
IF (
YEAR ( _date ) = YEAR ( TODAY () )
&& QUARTER ( _date ) = QUARTER ( TODAY () ),
0,
1
)
2. Create a slicer which applied the field [Date] of date dimension table and apply a visual-level filter with the condition (Flag is 1)
Best Regards
Hi @agd50 ,
I created a sample pbix file(see the attachment), please check if that is what you want.
1. Create a measure as below
Flag =
VAR _date =
SELECTEDVALUE ( 'Date'[Date] )
RETURN
IF (
YEAR ( _date ) = YEAR ( TODAY () )
&& QUARTER ( _date ) = QUARTER ( TODAY () ),
0,
1
)
2. Create a slicer which applied the field [Date] of date dimension table and apply a visual-level filter with the condition (Flag is 1)
Best Regards
Problem with relative Date Filter/slicer: It will leave me some data that is not what I'm looking for then I will have to manually (not automated) remove the dates I don't want. Example below: (Using relative date to include only 4 years but then it will include 2019 which I don't want, if I use years then it will exclude 2023 - current year)
@agd50 do you even know what I'm talking about? Create a relative date slicer or filter in Power BI - Power BI | Microsoft Learn
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@agd50 have you looked at relative date filtering?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
I don't think that will work as I want them to be able to select year and quarter in the slicer, instead of single dates
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
142 | |
108 | |
101 | |
81 | |
74 |