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
Anonymous
Not applicable

Cambiar True

Hola

Estoy trabajando en un informe power bi, tengo dos columnas con la marca de tiempo, una es para cuando un opreater escanea en el dispositivo y otra para cuando se han escaneado. No estoy seguro de si el Switch True Function es la fountion que necesito. Pero me gustaría tener un objeto visual que se vuelva verde si están conectados a la decive y rojo que no son. ¿Es posible?

9 REPLIES 9
amitchandak
Super User
Super User

@Jlivenere-25, no muy claro. Pero puede crear una medida de color. y usar eso usando el formato condicional de la opción "Valor de campo"

ejemplo de medida

Color  = if(FIRSTNONBLANK(Table[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170 
,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))
Color sales = if([Sales Today] -[sales yesterday]>0,"green","red")

color =
switch ( true(),
FIRSTNONBLANK(Table[commodity],"NA") ="commodity1" && sum(Table[Value]) >500,"lightgreen",
FIRSTNONBLANK(Table[commodity],"NA") ="commodity2" && sum(Table[Value]) >1000,"lightgreen",
/// Add more conditions
"red"
)

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

formato de icono
https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/
https://community.powerbi.com/t5/Desktop/FORMAT-icon-set-for-use-in-a-data-card/td-p/811692

Anonymous
Not applicable

No sé otra manera de explicarlo, y no creo que ese ejemplo es lo que estoy buscando

Anonymous
Not applicable

Sólo quiero saber el estado de la base del dispositivo en las columnas de marca de tiempo, verde si está en rojo si está apagado.

parry2k
Super User
Super User

@Jlivenere-25 no está completamente claro lo que está intentando lograr, pegue algunos datos de muestra y la salida esperada. Lee este post para obtener tu respuesta rápidamente.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



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.

Anonymous
Not applicable

En la imagen de abajo están la hora de inicio y finalización para diferentes dispositivos. Quiero saber si es posible crear un objeto visual usando la función SwitchTrue(), que cambiará de color si alguien ha escaneado dentro o fuera de ese dispositivo

Jlivenere-25_0-1598455534669.png

hola @Jlivenere-25

Este es un problema de "fecha de inicio y fecha de finalización", muy común, podría referirse a este post similar:

https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365

Si todavía tiene problemas, por favor comparta algunos datos de muestra simples y cómo le gusta su salida esperada.

saludos

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Creo que estoy más allí, ¿cómo se crea una medida que convierten una columna verdadero en unos y ceros

hola @Jlivenere-25

Comparta algunos datos de muestra simples y su salida esperada, que será una gran ayuda.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

saludos

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hola

Lo siento por el retraso, aquí básicamente lo que quería, tengo una columna que tiene "Acttive" o "Inactive". Me imagino una declaración if que agrega una nueva columna con 1 y 0 (lo que se ve en la imagen). Si ese valor es 1 entonces el color con ser verde para hacerme saber que la máquina está activa. Quería que DeviceName cambiara de color si el dispositivo estaba activo o no. Pero esta es la mejor solución que se me ocurrió .

Jlivenere-25_0-1600107717887.png

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.