Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be 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

Reply
mpataki32
Helper III
Helper III

Date slicer with an additional radio button slicer

I have a date slicer:

mpataki32_0-1701365107716.png

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? 

 

1 ACCEPTED SOLUTION
CoreyP
Solution Sage
Solution Sage

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.

View solution in original post

3 REPLIES 3
CoreyP
Solution Sage
Solution Sage

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.

CoreyP_0-1701374898169.pngCoreyP_1-1701374929992.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.