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
moltra
Helper IV
Helper IV

Cómo mostrar líneas de gol en un gráfico de líneas

Tengo una tabla que se crea resumiendo los datos de una tabla grande semanalmente. Estoy graficando la tabla resumida en un gráfico de líneas. Me gustaría tener 2 "Líneas de gol" en el gráfico. Uno sería el 30% del valor MAX de uno de los campos de la tabla Resumida. El otro sería el 10% del valor MAX.

He intentado varias formas de hacer esto, pero o bien obtener una advertencia de error circular o los cambios de datos de campo MAX en función de la fecha y la hora.

Cualquier información u orientación sería genial. Estoy trabajando en una manera de mostrarles lo que estoy deseando hacer, sólo tienen que asegurarse de que no estoy compartiendo datos internos o procesos.

Esto es lo que estoy recibiendo si intento

MAXX ( VALUES ( Tabla[ColumnonXAxis] ), [Medida utilizada en el gráfico de líneas] ) * .30
LecturaHora de la fechaNombre30% por ciento
99212/31/2019 0:00Widget19.2
10841/1/2020 0:00Widget21
27161/2/2020 0:00Widget55.5
25961/3/2020 0:00Widget54
10491/4/2020 0:00Widget13.5
15861/5/2020 0:00Widget51.6
31511/6/2020 0:00Widget54.9
31691/7/2020 0:00Widget56.1
28576/3/2020 0:00Widget53.7
28836/4/2020 0:00Widget54
15376/5/2020 0:00Widget52.2
10936/6/2020 0:00Widget14.1
10226/7/2020 0:00Widget13.2
25606/8/2020 0:00Widget54
29136/9/2020 0:00Widget54
29046/10/2020 0:00Widget53.7
29056/11/2020 0:00Widget53.1
10186/12/2020 0:00Widget57.6

Necesito calcular así. 30%Porcentaje de 3169 * .3 a 950,7

LecturaHora de la fechaNombre30% por ciento
99212/31/2019 0:00Widget950.7
10841/1/2020 0:00Widget950.7
27161/2/2020 0:00Widget950.7
25961/3/2020 0:00Widget950.7
10491/4/2020 0:00Widget950.7
15861/5/2020 0:00Widget950.7
31511/6/2020 0:00Widget950.7
31691/7/2020 0:00Widget950.7
28576/3/2020 0:00Widget950.7
28836/4/2020 0:00Widget950.7
15376/5/2020 0:00Widget950.7
10936/6/2020 0:00Widget950.7
10226/7/2020 0:00Widget950.7
25606/8/2020 0:00Widget950.7
29136/9/2020 0:00Widget950.7
29046/10/2020 0:00Widget950.7
29056/11/2020 0:00Widget950.7
10186/12/2020 0:00Widget950.7
1 ACCEPTED SOLUTION

@moltra por lo que la primera parte que sabes lo que es la nueva parte que agregamos es el DIVIDE

antes de dividir estamos obteniendo el resultado de la medida para cada fecha seleccionada incluso esa fecha tiene alguna lectura o no, con la división obtenemos la suma de la lectura para ese día y la fecha donde no hay lectura obtendremos blank(), dividiendo el espacio en blanco con el que obtenemos el valor en blanco y multiplicándolo con (_max*0.1) lo convertirámos en blanco.

pero los otros días donde hay una lectura, digamos en un 04 de enero, la suma de la lectura es 10, por lo que dividir 10 con 10 nos dará 1 y multiplicar (_max*0.1) con 1 devolverá el mismo valor devolverá el mismo valor

Básicamente de DIVIDE estamos obteniendo el valor de BLANK o 1 basado en la lectura para ese día y en caso de blank() nuestra medida está devolviendo el valor en blanco y no aparece en el objeto visual. Espero que todo tenga sentido si no, hágamelo saber y trataré de explicarlo más.

10%goal = 
VAR _max=MAXX(ALLSELECTED('Table'),'Table'[Reading])
Return
(_max*0.1) * DIVIDE ( SUM ( 'Table'[Reading]), SUM('Table'[Reading]) )

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

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.



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.

View solution in original post

23 REPLIES 23
Pragati11
Super User
Super User

Hola @moltra ,

Si hace clic en el gráfico de líneas visual, en Panel de visualizaciones, verá las siguientes opciones:

line1.png

Puede definir aquí Líneas de referencia Mín.

Gracias

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Necesito una línea del 10% y una línea del 30 por ciento del valor MAX. Por favor, mire la solicitud editada arriba.

@moltra que probé la solución que propuse, necesita crear dos medidas más para poner esto en marcha. Como no conozco tus datos, acabo de darte la expresión que necesitas aplicar a tu modelo.

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

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.



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.

Probé su fomula me dio los datos en la columna 30%goal_Incorrect. Necesito lo que se muestra en la columna 30%goal_correct.

question_table.png

Anonymous
Not applicable

Hola @moltra ,

Cree 2 medidas como se indica a continuación:

10%goal = 
VAR _max=MAXX(ALL('Table'),'Table'[Reading])
Return
_max*0.1
30%goal = 
VAR _max=MAXX(ALL('Table'),'Table'[Reading])
Return
_max*0.3

Y verás:

Annotation 2020-06-15 134128.png

Para el archivo .pbix relacionado, pls haga clic aquí.

Saludos
Kelly
¿He respondido a tu pregunta? ¡Marca mi puesto como una solución!

@v-kellya-msft

Esto funciona muy bien, pero si selecciono un nombre diferente en la segmentación, no actualiza los objetivos del 10% o 30%.

Acabo de darme cuenta de que por alguna razón está cambiando el eje X de 7 días a más de 5 meses.

@moltra tratar de cambiar las medidas propuestas por @v-kellya-msft de ALL a ALLSELECTED.

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

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.



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.

@parry2k Eso corrigió los valores para que la segmentación los cambie.

Pero todavía tiene el problema de que el eje X cambia cuando agredo las medidas.

@moltra no estoy seguro de lo que quiere decir con cambios del eje X. puede compartir la captura de pantalla de lo que se refiere?



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.

@parry2k Este es el aspecto del gráfico sin el objetivo del 10%.

NoMeasures.pngSin medidas

Esto es lo que parece si agredo la medida 10%Goal al gráfico.

withMeasures.pngMedidas

@moltra lo tengo, cambien las dos medidas así

10%goal = 
VAR _max=MAXX(ALL('Table'),'Table'[Reading])
Return
(_max*0.1) * DIVIDE ( SUM ( 'Table'[Reading]), SUM('Table'[Reading]) )

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

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.



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.

Eso funcionó después de cambiar el TODO a ALLSELECTED. Pero no veo cómo se está eliminando los datos que no son necesarios.

@moltra para que todo esté funcionando o no y luego puedo explicar lo que fue la solución.

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

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.



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.

@parry2k Sí, todo está funcionando correctamente ahora. Si cambias todo a los allselected, aceptaré como solución.

@moltra su bit de declaración confusa, usted cambió de TODO a ALLSELECTED correcto? ¿Qué no funciona? Estás complicando las cosas o tal vez no lo entiendo.

Usted tiene que decir con precisión cuáles son sus medidas, lo que no está funcionando y cuál es su expectativa?



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.

@parry2k ¿El ALL en la medida los datos no se actualiza cuando uso la segmentación de nombre para seleccionar un nombre diferente.

10%goal = 
VAR _max=MAXX(ALL('Table'),'Table'[Reading])
Return
(_max*0.1) * DIVIDE ( SUM ( 'Table'[Reading]), SUM('Table'[Reading]) )

Cuando cambio ALL a ALLSELECTED, la medida cambia cuando selecciono un nombre diferente en la segmentación de nombre.

10%goal = 
VAR _max=MAXX(ALLSELECTED('Table'),'Table'[Reading])
Return
(_max*0.1) * DIVIDE ( SUM ( 'Table'[Reading]), SUM('Table'[Reading]) )

@moltra por lo que está utilizando ALL , debe usar ALLSELECTED , y su instrucción de problema todavía no está clara. Olvídate de TODO por ahora y luego di lo que no funciona.



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.

Todo funciona correctamente ahora, le estaba pidiendo que actualice su solución de ALL a ALLSELECTED para poder aceptarla como la solución.

@moltra aquí está. Le agradezco su paciencia.

10%goal = 
VAR _max=MAXX(ALLSELECTED('Table'),'Table'[Reading])
Return
(_max*0.1) * DIVIDE ( SUM ( 'Table'[Reading]), SUM('Table'[Reading]) )

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

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.



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.

@parry2k ¿Puede explicar cómo funciona su fórmula.

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.