March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a date slicer:
The end-users asked me to create a feature which will help them to click less, altough they like that they have the full period to see the data, but they want to see the current month data when they open the report, for that I have two questions in my mind:
- Is there a way to setup the existing filter to always show the current month, but if the user want it then they can expand it to full period?
- If the previous feature is not doable with the basic PBI visualizations, then I thinked about to have another slicer next to the original slicer and the new slicer is going to have two option:
- Current month --> Only shows the current month's data
- Full period --> Shows the full period's data including the current month's data as well.
For the second feature I started to create an custom column in my date table, but the problem is that altough I have an aux table with the option I don't know, how to setup the new slicer in a way to do that kind behaviour or should I use two column in my date table? One for the current month (identifying all the dates which belongs to the actual month) and another column which will identify the full period's dates?
Solved! Go to Solution.
A couple options:
1) Rather than a Between slider for date, you could use a Relative slider. ( e.g. Last 1 month, 2 months, etc. ) And then when you publish, have it already set to Last 1 Month so that will be the default view.
2) Your second option would also work. You just need to add a column to your date table:
CurrentMonth = IF( AND( MONTH( 'Date'[Date] ) = MONTH( TODAY() ) , YEAR( 'Date'[Date] ) = YEAR( TODAY() ) ) , "Show Current Month Only" , BLANK() )
Then add this column as a button slicer next to your date slider. You'll notice you'll have two buttons, one of which is blank. We want to hide this, so we basically have a single button toggle. In the filter pane of the visual, uncheck the blank, and have "Show Current Month Only" checked.
When a user selects that, it will filter the content on your report page for only the current month. When the user deselects that, all data will be shown.
A couple options:
1) Rather than a Between slider for date, you could use a Relative slider. ( e.g. Last 1 month, 2 months, etc. ) And then when you publish, have it already set to Last 1 Month so that will be the default view.
2) Your second option would also work. You just need to add a column to your date table:
CurrentMonth = IF( AND( MONTH( 'Date'[Date] ) = MONTH( TODAY() ) , YEAR( 'Date'[Date] ) = YEAR( TODAY() ) ) , "Show Current Month Only" , BLANK() )
Then add this column as a button slicer next to your date slider. You'll notice you'll have two buttons, one of which is blank. We want to hide this, so we basically have a single button toggle. In the filter pane of the visual, uncheck the blank, and have "Show Current Month Only" checked.
When a user selects that, it will filter the content on your report page for only the current month. When the user deselects that, all data will be shown.
Thank you so much! I made a similar DAX, but instead of Blank() I just started to populate zeros and I wanted to categorize each element into a category (I wanted to cordinate them with an aux table), your solution is better.
Obviously make the formatting according to your design language, but something like this should be easy for user experience.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |