Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I need 2 Date slicers [in between] : [Today is Sept 18, 2023]
1. The first slicer to show Previous months dates. the Date slicer edges should point at August 1 and August 31.
2. second date slicer should show June 1 2023 to current date: so, the slicer edges should point at June 1 and Sept 18.
Could you please suggest how to do it. Thanks.
@Anonymous Although looked closely there is a challenge with the way you solved the 2nd slicer, think if you are in Jan 2024, the end date will be Jan 2024 and the start date will be Jun 2024, and you will not get anything. You need to update it like this:
VAR _CurYear = YEAR(TODAY())
VAR _StartDate = MIN(DATE( _CurYear,6,1), TODAY () )
RETURN
CALENDAR(_StartDate, TODAY())
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.
@Anonymous perfect, I was not sure why you have Jun 2023 as the start date but you got the point on how to solve it.
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.
@Anonymous not sure but you can add two tables using following DAX expression:
Slicer 1 =
VAR __Today = TODAY ()
VAR __EndDate = EOMONTH ( __Today, -1 )
VAR __StartDate = EMONTH ( __Today, -2 ) + 1
RETURN
CALENDAR ( __startDate, __EndDate )
Slicer 2 =
VAR __EndDate = TODAY ()
VAR __StartDate = DATE ( 2023, 6, 1 )
RETURN
CALENDAR ( __StartDate, __EndDate )
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.
Thanks a lot @parry2k for your prompt response. 🙂
I did lil update to 2nd date slicer code as user wants the slicer's right edge to point to last day of previous month
VAR _CurYear = YEAR(TODAY())
VAR _EndDate = EOMONTH(TODAY(), -1)
VAR _StartDate = DATE( _CurYear,6,1)
RETURN
CALENDAR(_StartDate, _EndDate)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
55 | |
37 | |
34 |
User | Count |
---|---|
99 | |
56 | |
53 | |
44 | |
40 |