Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi
I have some IDs for which I calculated the average time worked.
Average overtime looks simply like this:
ID | Average Overtime worked | Indicator |
1273 | 8 | 1 |
4476 | 4 | 0 |
5623 | 6 | 1 |
2233 | 5 | 0 |
4423 | 7 | 1 |
Solved! Go to Solution.
Hi @acg ,
The [Margin Type] formula you have created could not be used as a calculated table, it should be a measure or a calculated column.
Measure:
Margin Type =
IF(
[Average overtime worked] > 5,1,0
)
Calculated column:
Margin Type column =
VAR _avg =
CALCULATE (
AVERAGE ( timesheet[Weekly_OverTimeHours] ),
ALLEXCEPT ( 'timesheet', timesheet[ID] )
)
RETURN
IF ( _avg > 5, 1, 0 )
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@acg , Create a new table like Indicator with values 1,0 and use that as slicer
Now create a measure like
calculate([Average Overtime worked]. filter(Values(Table[ID]), [Indicator] = max(Indicator[Indicator])))
Refer this, if needed
Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...
Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k
Does this also work for numeric outcomes? 0/1 needs to be numeric so that it can be used later on for some calculations / visuals, where the indicator needs to be counted.
Great @amitchandak,
I see you create the buckets and that is how you create the indicator.
So I created this as in:
Hi @acg ,
The [Margin Type] formula you have created could not be used as a calculated table, it should be a measure or a calculated column.
Measure:
Margin Type =
IF(
[Average overtime worked] > 5,1,0
)
Calculated column:
Margin Type column =
VAR _avg =
CALCULATE (
AVERAGE ( timesheet[Weekly_OverTimeHours] ),
ALLEXCEPT ( 'timesheet', timesheet[ID] )
)
RETURN
IF ( _avg > 5, 1, 0 )
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @acg , any luck with the last part of your problem? I am trying to solve the exact same scenario as you were.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
11 | |
11 | |
10 | |
6 |