The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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 |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
72 | |
48 | |
46 |