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
vsahin
Helper I
Helper I

Power BI Date Slicer For Time Frame

Hi Everyone,

 

I have a dashboard that shows bunch of metrics.

 

Some if these metrics are line charts showing values agains date.

 

I would like to add a Date slicer and choose month to change date. For example when I choose october 2023, I want to see dates, upto October 2023.

Capture.PNG

Currently when I filter a month on the slicer, it shows only selected month from slicer.

 

Capture2.PNG

 

I can do this(showed below) with Before selection on slicer but it's not user friendly. I want users simply choose month from drop down. 

 

Capture4.PNG

 

 

To sort this out think that I have a simple table with two columns. First column is Date and Second column is Values.

 

I also have a Date Table and created relationship between two tables.

 

Bonus Question:

My Final goal is two have last 3 calendar months.

 

I managed to capture last 3 months in visual but I would prefer to do it on measure.

 

Capture3.PNG

 

Thanks.

3 REPLIES 3
amitchandak
Super User
Super User

@vsahin , for that you have to use a slicer on an independent/disconnected table

 

//Date1 is an independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = eomonth(_max, -12) +1
return
calculate( sum(sales[Gross Sales]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))

 

Need of an Independent/disconnected Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

There is a very similiar question I found.

 

https://community.fabric.microsoft.com/t5/Desktop/Dates-Dropdown-slicer-to-filter-from-the-start-dat...


At that one everything works but I only need to see Year Month in Date Slicer, currently all days are coming in the slicer.

Thanks Amit,

I checked the video but it shows with a between slicer. I want to get rid of before slicer (and not use between slicer)  and use only a dropdown slicer to choose Report Month.

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.