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!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
I created a calculated column to create the below groups which are split based on the diff in days between one day and today()
Below 7
Between 7 and 14
More than 14
I was asked if it is possible to create a parameter that allows you to change the day diff you want to split the groups into.
Regards,
Solved! Go to Solution.
Hi @MarioCadena ,
Please do like this.
1. Create a "What If Parameter".
2. Create such a measure.
Expected Delivery - No subscribed =
SWITCH(
TRUE(),
MAX([Delivered?]) = "Yes" && MAX([Subscribed?]) = "No", 10,
MAX([Delivered?]) = "No" && MAX([Subscribed?]) = "No" && DATEDIFF(TODAY(), MAX([Expected Delivery Date]), DAY ) <= [Parameter Value], 5,
MAX([Delivered?]) = "No" && MAX([Subscribed?]) = "No" && DATEDIFF(TODAY(), MAX([Expected Delivery Date]), DAY ) > [Parameter Value], 0
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @MarioCadena ,
Please do like this.
1. Create a "What If Parameter".
2. Create such a measure.
Expected Delivery - No subscribed =
SWITCH(
TRUE(),
MAX([Delivered?]) = "Yes" && MAX([Subscribed?]) = "No", 10,
MAX([Delivered?]) = "No" && MAX([Subscribed?]) = "No" && DATEDIFF(TODAY(), MAX([Expected Delivery Date]), DAY ) <= [Parameter Value], 5,
MAX([Delivered?]) = "No" && MAX([Subscribed?]) = "No" && DATEDIFF(TODAY(), MAX([Expected Delivery Date]), DAY ) > [Parameter Value], 0
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@MarioCadena , what do you mean by parameter here.
If you need it dynamic based on a selected date, you need to create a measure and then use an independent bucket table and create a new measure with row context
measure =
var _max = maxx(allselected('Date'),'Date'[Date])
return
datediff(max(Table[Date]),_max, DAY)
refer how to do dynamic segmentation https://www.youtube.com/watch?v=CuczXPj0N-k
https://www.daxpatterns.com/dynamic-segmentation/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization
Sorry if I don't explain myself correctly.
I have created a calculated column that shows items that are going to expire within the following 7 days and more than 7 days.
I was asked whether there is a way to make number 7 dynamic by a parameter or slicer that affects the previous chart.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 42 | |
| 41 | |
| 21 | |
| 21 |
| User | Count |
|---|---|
| 150 | |
| 106 | |
| 64 | |
| 36 | |
| 36 |