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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Team,
I have to create a slicer filter with date column intervals, colunm name current_end_date in my table
if (interval([Current End Date] - today(), 'd') < 0, 'expired',
if (interval([Current End Date] - today(), 'd') > 0 and interval([Current End Date] - today(), 'd') < 30, 'less than 30 days',
if (interval([Current End Date] - today(), 'd') > 31 and interval([Current End Date] - today(), 'd') < 60 , 'less than 60 days',
if (interval([Current End Date] - today(), 'd') > 61 and interval([Current End Date] - today(), 'd') < 90 , 'less than 90 days',
'more than 90 days'))))
like this kind of calculations. So the Slicer should display 5 options like above image.
Please help me on this.
Solved! Go to Solution.
Hi @Nimmi,
You can add a column and try this formula.
Column = VAR interval = DATEDIFF ( [Current End Date], TODAY (), DAY ) RETURN SWITCH ( TRUE (), interval < 0, "expired", interval > 0 && interval < 30, "less than 30 days", interval > 31 && interval < 60, "less than 60 days", interval > 61 && interval < 90, "less than 90 days", "more than 90 days" )
Best Regards,
Hi @Nimmi,
You can add a column and try this formula.
Column = VAR interval = DATEDIFF ( [Current End Date], TODAY (), DAY ) RETURN SWITCH ( TRUE (), interval < 0, "expired", interval > 0 && interval < 30, "less than 30 days", interval > 31 && interval < 60, "less than 60 days", interval > 61 && interval < 90, "less than 90 days", "more than 90 days" )
Best Regards,
Create a new calculated column with "IF" statement and use the same formula you mentioned below.
Hope that resolve your query.
Regards,
Shakeel
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 101 | |
| 76 | |
| 56 | |
| 51 | |
| 46 |