Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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 April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
16 | |
10 | |
9 | |
7 | |
7 |
User | Count |
---|---|
20 | |
11 | |
8 | |
6 | |
6 |