Forum Discussion
DAX FORMULA
Hola a todos, tengo el siguiente problema, estaria necesitando crear rangos de horarios es decir, clasificar a un numero de personas por la empresa y la hora en que llegan, como una condicional de decir, si una persona corresponde a la empresa x y su hora de llegada es igual a la de entrada (08:15) entonces me de como resultado que cumpla, sin embargo si su llegada es mayor o igual a las 09:40, me de como resultado que tiene un atraso y si es mayor a 10:30, no cumple! en sintesis seria poner una condicion mezclando el nombre de la empresa con las horas, es posible eso?
1 Reply
- negi007
Community Champion
AGonza123 here is the solution you can use in this case
1. First create a base table which will have upper limit for each company employees to enter the office
2. second table would be your transactional table that will have daily employee coming to office time.
3. In the second table, i have used one calculated column that will determine if employee was on time or late within limits or late outside limits.
Status =var first_St = LOOKUPVALUE (Base_Table [Expected_Arrival_Time], Base_Table [Company Name], Daily_Transaction [Company Name])var second_St = LOOKUPVALUE (Base_Table [Expected_Arrival_Time_2], Base_Table [Company Name], Daily_Transaction [Company Name])var act_time = Daily_Transaction [Actual_Arrival_Time]returnif (act_time <= first_St, "On time",if (act_time <= second_St, "Late within limits","Late outside limits"))i have also sharing pbix file for your reference. this can help youDo let me know if you able to do it. thanks