Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hey guys
I am trying to create a True/False field based on different constraints with one constraint that should be dynamic due to a field selection.
In the past I worked with other BI-tools, however I started with PowerBI few months ago and my personal guess is, that the solution is either super easy or I need to completely rewrite it, as "you cannot do this in calculated columns".
Here is the column without the dynamic constraint (this works fine):
IsExpiring =
if( LEN('Periods'[PeriodFrom])<1 || LEN('Periods'[PeriodTo])<1,
FALSE,
if(
'Periods'[PeriodFrom]<=TODAY() && 'Periods'[PeriodTo]>=today() && ('Periods'[PeriodTo]<=today()+20)
,TRUE,
FALSE
))
Now, I want to make this dynamic:
By replacing the +20 by the max selected value in the field Sel_ExpiryDate[Days], which is a data island (no relations to any other table) solely for selecting the maximum number of days that should be added.
While the posted calculated table is working fine, it does calculate the max(Sel_ExpiryDate[Days]) so far, whatever I try.
Tried so far:
- entered max(Sel_ExpiryDate[Days]) directly
- created a measure with max(Sel_ExpiryDate[Days]) in the Sel_ExpiryDate table
-created a measure with max(Sel_ExpiryDate[Days]) in the Period table
@HotChilli yes it is a slicer with a slider.
I wanted to give the user the flexibility to choose the number of days.
If there are better solutions to not just have a fixed measure but instead give the user some flexibility here - that would be awesome 🙂
"solely for selecting the maximum number of days" -> How is this selected? In a slicer or filter? If so, the calculated column won't react to that.
A measure would react to it.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 84 | |
| 49 | |
| 37 | |
| 30 | |
| 30 |