cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
yuhkao
Microsoft
Microsoft

Formato condicional con medida sobre criterios

Hola Experto

Basándome en esta pregunta, obtuve una ecuación más profunda sobre los datos y me gustaría aplicar el formato condicional con código de color en un umbral diferente.

Ejemplo:

Ene-2020 Feb-2020 Mar-2020 Abr-2020

datos de datos de datos de materias primas1

datos de datos de datos de materias primas2

datos de datos de datos de materias primas3

Data threhold1 - meta inicial + 1 *2.57* SQRT (objetivo inicial*(1- meta inicial)/base)

Data threhold2 - meta inicial + 2 *2.57* SQRT (objetivo inicial*(1- meta inicial)/base)

Data threhold3 - meta inicial + 3 *2.57* SQRT (objetivo inicial*(1- meta inicial)/base)

*El objetivo inicial es diferente en la mercancía

*base es diferente en el uso del mes o mercancía

Con los datos threhold1 a 3, le gustaría aplicar diferentes códigos de color, como verde, amarillo, rojo

Gracias

1 REPLY 1
amitchandak
Super User
Super User

@yuhkao , Puede crear una medida como esta. Y lo usó con la opción Campo en formato condicional

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
https://community.powerbi.com/t5/Desktop/FORMAT-icon-set-for-use-in-a-data-card/td-p/811692

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May 23 2022 episode 5 with aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt will talk about the importance of Data Modeling.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!

Top Kudoed Authors