Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
36 | |
33 | |
18 | |
18 |