Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
In this table I need to create a new calculted column that show the #User of the process 3 for all rows with the same TimeShiftBegin.
In this case, for the idProduction 74308 to 74314, it will be 401 in the new column.
Thanks
Solved! Go to Solution.
This calculated column should work:
#User =
VAR CurrentTimeShift = Table[TimeShiftBegin]
RETURN
CALCULATE (
MAX ( Table[idUser] ),
FILTER (
Table,
Table[idProcess] = 3
&& Table[TimeShiftBegin] = CurrentTimeShift
)
)
Hi @Anonymous,
Based on my test, you could refer to below steps:
Sample data:
Create a new calculated column:
Column = CALCULATE(MAX('Table1'[iduser]),FILTER('Table1','Table1'[Time]=EARLIER(Table1[Time])))
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
This calculated column should work:
#User =
VAR CurrentTimeShift = Table[TimeShiftBegin]
RETURN
CALCULATE (
MAX ( Table[idUser] ),
FILTER (
Table,
Table[idProcess] = 3
&& Table[TimeShiftBegin] = CurrentTimeShift
)
)
| User | Count |
|---|---|
| 57 | |
| 43 | |
| 32 | |
| 16 | |
| 13 |
| User | Count |
|---|---|
| 84 | |
| 70 | |
| 38 | |
| 27 | |
| 24 |