Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
I currently have a Slicer that has 3 options : Active, Inactive and Future. These option come from a calculated column like this :
IF startdate <= TODAY() && enddate >= TODAY(), "Active",
IF enddate < TODAY(), "Termed",
IF start_date > TODAY(), "Future"
I need to create a slicer that will let me select a date and based on that date, it should give me Active, Inactive, Future instead of just having TODAY(). is this possible ?
Im using imported date from MSSQL
Solved! Go to Solution.
@Anonymous,
"I need to create a slicer that will let me select a date and based on that date, it should give me Active, Inactive, Future instead of just having TODAY(). is this possible ? "
Create a calendar table using dax below.
calendar = CALENDAR("1/1/2016","12/30/2018")
Create a measure in your original table.
checkdate = IF(MAX(Table[startdate] )<= MAX('calendar'[Date]) &&MAX( Table[enddate] )>=MAX('calendar'[Date]), "Active", IF(MAX(Table[enddate]) < MAX('calendar'[Date]), "Termed",IF( MAX(Table[startdate] )> MAX('calendar'[Date]), "Future")))
Create date slicer using date field of calendar table.
Regards,
Lydia
@Anonymous,
"I need to create a slicer that will let me select a date and based on that date, it should give me Active, Inactive, Future instead of just having TODAY(). is this possible ? "
Create a calendar table using dax below.
calendar = CALENDAR("1/1/2016","12/30/2018")
Create a measure in your original table.
checkdate = IF(MAX(Table[startdate] )<= MAX('calendar'[Date]) &&MAX( Table[enddate] )>=MAX('calendar'[Date]), "Active", IF(MAX(Table[enddate]) < MAX('calendar'[Date]), "Termed",IF( MAX(Table[startdate] )> MAX('calendar'[Date]), "Future")))
Create date slicer using date field of calendar table.
Regards,
Lydia
Thanks so much.
what Im trying to do is :
We have a list of people who are either active, termed or future active. these people all have a start date and an end date. i have a slicer where i can select "Active", "termed", "Future". when i click on active, all the people who are active today show up. when i click termed, all who were active before today and not active anymore will show up, if the start date is greater than today, then future active records will show up.
Now, all these options are relative to todays date. I want to do this based on a date other than today(future or past). So when i select a date, the active, termed and future records show up based on the date i select not not today.
I would like this date to be a single select date and not a range.
Basically your solution works, to an extent. I also need a slicer that would let me select active, termed and future.
@Anonymous,
It is not possible to drag a measure to slicer, you can drag the measure into visual level filter and then set different values.
Based on my understanding, you check the user status by creating a calculated column containing active, inactive and so on, however, in this case, calculated column can't be changed dynamically based on slicer selection(date slicer in your scenario), please review this KB to get details.
Regards,
Lydia