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 ,
how do you create a custom column in powerbi Dax on a table based on an IF-condition that can be used in a slicer?
| Salesrep | Salesrep_Num | StartDate | End Date |
| Joe Johnson | 1334 | Jul-1-2022 | Sep-10-2022 |
| Sandra Bolt | 2442 | Jul-1-2022 | Sep-10-2022 |
| Peter Stark | 9428 | Apr-2-2022 | Jul-1-2022 |
| Ronaldo Forbes | 5920 | Jul-1-2022 |
Date slicer [Jul-1-2022] to [Oct-30-2022]
How can I create a column in measure to say Yes or No if the start and end date is within the selected date range?
Solved! Go to Solution.
you can try this
Measure =
var _min=min('date'[Date])
var _max=max('date'[Date])
return if(min('Table'[StartDate])>=_min&&min('Table'[End Date])<=_max,"Y","N")
pls see the attachment below
Proud to be a Super User!
you can try this
Measure =
var _min=min('date'[Date])
var _max=max('date'[Date])
return if(min('Table'[StartDate])>=_min&&min('Table'[End Date])<=_max,"Y","N")
pls see the attachment below
Proud to be a Super User!
Thanks @ryan_mayu , this was helpful. My only challenge is I'm not able to use the measure to filter other visuals on the page. I would like to filter Y for yes at page level filter
yes, measure can only add to visual filter. Let's see if anyone else can provide better solution
Proud to be a Super User!
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 |
|---|---|
| 104 | |
| 81 | |
| 66 | |
| 50 | |
| 45 |