Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
KelvinMorel
Helper II
Helper II

Hoja de asistencia a Power BI

Hola

Me cuesta pensar en cómo conectar Power BI con la siguiente hoja de asistencia.

Tengo y Employees tabla en PBI y me gustaría extraer de la siguiente tabla los días que están presentes en el trabajo, no sé cómo hacerlo.

table0.jpg

Cualquier idea...

14 REPLIES 14
AllisonKennedy
Super User
Super User

@KelvinMorel Algunas preguntas:

¿Cada mes está en una tabla de Excel independiente?

¿Es posible actualizar los encabezados de columna 01, 02, 03 en Excel con la fecha completa (todavía puede formatear para que solo muestre 01, 02, etc.)?

¿Hay algún otro dato en esta tabla de trabajo que esté utilizando?

¿Tiene una tabla DimDate? https://allisonkennedycv.blogspot.com/2020/04/dimdate-what-why-and-how.html

En última instancia, la manera de hacerlo será despivotar las fechas mediante Power Query. Si no tiene otros datos procedentes de esa tabla, simplemente seleccione el encabezado de columna Empleado en Power Query y Unpivot otras columnas.

Si no ha actualizado los encabezados de columna en Excel, ahora tendrá que hacer una serie de código M o agregar y combinar columnas en Power Query para obtener la fecha completa.

También recomendaría combinar todos los meses usando un Apéndice.


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

@KelvinMorel esto se puede lograr transformando los datos en la consulta de energía, no es necesario cambiar la hoja. Comparta un par de meses de datos en una hoja de Excel, comparta a través de una unidad de unidad/google y elimine la información confidencial antes de compartirla. Una vez que tenga el archivo de datos te enviaré la solución.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hola Parry2k,

Muchas gracias, aquí hay una hoja ficticia:

https://drive.google.com/file/d/1MYlJJ_0UvHWwMhfpBXZFT28OqgxsouHr/view?usp=sharing

Voy a echar un vistazo a las aswers más tarde, voy a tener una reunión ahora mismo.

@KelvinMorel que has creado una tabla para cada mes, ¿quieres que use tablas o la hoja de asistencia completa, la solución va a ser diferente dependiendo de lo que quieras que use. si siempre va a tener mesas, entonces recomendaría que lo use.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Sí Parry2k,

Si estás teniendo un ordenador, el personal de mente no yo podría llenar las mesas.

@KelvinMorel eso lo hace súper simple, pero una cosa crítica que falta en el conjunto de datos son años? Dado que los nombres de las tablas son Ene/Feb/Mar y no dice si para qué año, ¿crees que habrá un archivo de Excel separado para cada año con 12 tablas en él, una para cada mes. Me gusta armar una solución más escalable en lugar de patchwork, soy sólo yo. 🙂



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Estamos a la vez que tenemos una solución y si ésta es la que estamos buscando que podría ser más fácil tener años...

Muchas gracias por el esfuerzo...

Hola @KelvinMorel ,

Creo que es muy difícil extraer la información que desea de esta tabla. Puede considerar el uso de SharePoint para registrarla asistencia y, a continuación, usar power bi para conectarse al origen de datos y mostrar el objeto visual

Saludos
Liang
Si este post ayuda, por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Es muy grosero que sea tan difícil sacar la información de esta mesa. Honestamente, mi cabeza estaba a punto de explotar pensando en hacerlo de todos modos.

Estaba pensando que tal vez podría "transponer" la tabla para obtener columnas como: [Fecha] [Emp01] [Emp02] [Emp03] y en el nivel de filas "W" o vacío.

Voy a echar un vistazo a la opción Sharepoint, así

@KelvinMorel sentimos que tomó un poco más, día ocupado, la solución está adjunta. Puede ajustarlo según sus necesidades. No conseguimos encontrar tu ubicación exacta. si tiene preguntas, no dude en comunicarse.

Siempre hay una solución, una cuestión de tomar tiempo y entender el problema y el boom...

image.png

Me gustaría elogiossi mi solución me ayudó.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para darle a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Wow @parry2k

No sé qué decir, todavía necesito entender cómo lo hiciste, ¡pero es simplemente awsome! Tal vez vuelva con la pregunta, pero muchas gracias por ayudarme.

@KelvinMorel alegran de ayudar, es bastante directo, creo que todavía puedo ajustar algunas cosas, pero es bastante bueno por ahora. 🙂



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hola de nuevo,

Estoy tratando de entender la función "fnAttendanceData" para ver si podía modificarla para que la fecha pudiera leerse completamente, pero como era de esperar no funciona de esa manera

Su fnAttendanceData

(AttendanceTable as table, Month as text, Year as number) =>
let
 //   Year = 2020,
//    Month = Text.Proper("Apr"),
    Months = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"},
    MonthNumber = List.PositionOf(Months, Month)+1,
    Source = AttendanceTable,
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"EMPLOYEE NAME"}, "Day", "Worked"),
    #"Added Custom" = Table.AddColumn(#"Unpivoted Other Columns", "Work Date", each #date(Year,MonthNumber, 1)),
    #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Day"})
in
    #"Removed Columns"

Mío

(AttendanceTable as table, Day as text, Month as text, Year as number) =>
let
 //   Year = 2020,
//    Month = Text.Proper("Apr"),
    Months = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"},
    MonthNumber = List.PositionOf(Months, Month)+1,
    DayNumber = List.PositionOf(Days, Day)+1,
    Days = {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"},
    Source = AttendanceTable,
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"EMPLOYEE NAME"}, "Day", "Worked"),
    #"Added Custom" = Table.AddColumn(#"Unpivoted Other Columns", "Work Date", each #date(Year,MonthNumber,DayNumber, 1)),
    #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Day"})
in
    #"Removed Columns"

Hola Parryk2,

Ahora, cuando las fechas se están poniendo a través de Power BI, obtenemos 01/mm/aaaa me preguntaba si podríamos obtener la fecha completa como dd/mm/aaaa.

¿Podría ser posible?

Grtz

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.