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
CliffordHagan
New Member

Tabla de análisis de delitos

Estoy tratando de hacer una tabla de análisis de delitos en tiempo real visual basado en una consulta sql en vivo. Tengo una tabla de datos que tiene columnas que proporciona la fecha (date_occurred) que tuvo lugar el delito, el número uniforme de informe de delito (ucr) y la descripción (UCR_description) para cada código UCR.

Fecha de la fecha en que ocurrióCódigo UCRDescripción del código
1/1/20110H
1/1/20210S
1/1/20740el
1/1/20600B
1/1/20600B
1/1/20310R
1/1/20310R
1/1/20310R
1/1/20210S
12/12/19820T
12/12/19820T
12/12/19810T
12/12/19740el
12/12/19900Ar
12/12/19110H
12/12/19210S
12/12/19210S
12/12/19600B
1/17/20600B
1/17/20310R
1/17/20310R
1/17/20310R
1/17/20210S
1/17/20820T
1/17/20820T
1/17/20810T
1/17/20740el
1/17/20900Ar
1/17/20900Ar

Estoy tratando de hacer un año hasta la fecha comparación por cada código UCR que produciría una tabla visual como esta:

UcrDescripción20202019% Cambio
110H110.00%
210S12-50.00%
310R60600.00%
600B31200.00%
740el21100.00%
810T110.00%
820T220.00%
900Ar21100.00%

Puedo hacer que la tabla visual funcione para YTD 2020, pero no puedo averiguar cómo mostrar el año hasta la fecha comparación entre 2020 y 2019. El año hasta la fecha siempre se compararía este año con el del año pasado.

Cualquier ayuda sería apreciada.

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hola

Puede descargar mi archivo PBI desde aquí.

Espero que esto ayude.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
parry2k
Super User
Super User

@CliffordHagan hay muchos mensajes en comparación con el año anterior y la clave es agregar dimensión de fecha/calendario en el modelo. Hay muchos mensajes sobre cómo agregar la dimensión de fecha/calendario y como es una práctica recomendada hacer todos los cálculos de Time Intelligence desde esta dimensión de fecha/calendario. Este es su punto de partida y usted lo hará funcionar fácilmente usando funciones de inteligencia del tiempo.

Me 💖 Kudos 🙂 si mi solución me ayudara. 👉 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.

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.