Hi All,
I still haven’t crack the method to get my payroll working automatically. I am able to use it in manual mode but I like it to be one-click all [name] to be payroll ready (computed).
in the [name] column, I am extracting the name from my list thru this expression:
ANY(
TOP(
(
LIST(
Select(Dipstick[Pump 1 Attendant],And([Date]>=[_Thisrow].[Date Start],[Date]<=[_Thisrow].[Date End])),
Select(Dipstick[Pump 2 Attendant],And([Date]>=[_Thisrow].[Date Start],[Date]<=[_Thisrow].[Date End])),
Select(Dipstick[Cashier],And([Date]>=[_Thisrow].[Date Start],[Date]<=[_Thisrow].[Date End])))
- LIST(Select(Salary[Name],And([Week Salary Count]>0,And([Date Start]>=[_Thisrow].[Date Start],[Date End]<=[_Thisrow].[Date End]))))),
1
)
)
I have also set the valid-if to reduce the name list if the name is already payroll ready (computed).
(
(Select(Dipstick[Pump 1 Attendant],And([Date]>=[_Thisrow].[Date Start],[Date]<=[_Thisrow].[Date
End]))
+
Select(Dipstick[Pump 2 Attendant],And([Date]>=[_Thisrow].[Date Start],[Date]<=[_Thisrow].[Date
End]))
+
Select(Dipstick[Cashier],And([Date]>=[_Thisrow].[Date Start],[Date]<=[_Thisrow].[Date End]))
)
-
Select(Salary[Name],And([Week Salary Count]>0,And([Date Start]>=[_Thisrow].[Date Start],[Date
End]<=[_Thisrow].[Date End])))
)
the challenge is to ensure that the action will select the next available [name] to run the computation of the week payroll.
to add, I have also created a counter that supposed to stop the action when the counter reached 0.
thanks