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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
manuelacardonan
Frequent Visitor

Formato Condicional Con Porcentajes

Hola a todos

 

tengo una medida (% Cump) que me muestra la comparacion porcentual entre las columnas [Unidades Ppto] y [Unids Prod], quisiera tener un formato que me muestre los iconos de acuerdo a el resultado de [% Cump.] asi:

 

si [% Cump.] es <0 sea un icono rojo

si [% Cump.] es >= 0 y < 10 sea un icono naranja o amarillo

si es [% Cump.] es > 10 sea un icono verde.

 

Espero me puedan ayudar ya que no he encontrado la solución, muchas gracias

 

manuelacardonan_0-1714408220871.png

 

1 ACCEPTED SOLUTION
v-jiewu-msft
Community Support
Community Support

Hi @manuelacardonan ,

Based on my testing, please try the following methods:

1.Create the simple table.

vjiewumsft_0-1714442734096.png

2.Create the new measure to calculate the percentage.

 

% Cump = 
VAR unida = SUMX('Table', 'Table'[Unidades Ppto])
VAR unid = SUMX('Table', 'Table'[Unids Prod])
VAR result = unid - unida
RETURN
DIVIDE(result, unida)

 

vjiewumsft_2-1714442793631.png

3.Create the measure to filter the percentage.

 

Conditional formatting = 
IF([% Cump] < 0, "red",
    IF([% Cump] >= 0 && [% Cump] < 0.1, "yellow",
        IF([% Cump] > 0.1, "green")
    )
)

 

4.Select the cump and click the conditional formatting background.

vjiewumsft_3-1714442805290.png

5.Select the Field value and conditional measure.

vjiewumsft_4-1714442830348.png

6.The result is shown below.

vjiewumsft_5-1714442837806.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jiewu-msft
Community Support
Community Support

Hi @manuelacardonan ,

Based on my testing, please try the following methods:

1.Create the simple table.

vjiewumsft_0-1714442734096.png

2.Create the new measure to calculate the percentage.

 

% Cump = 
VAR unida = SUMX('Table', 'Table'[Unidades Ppto])
VAR unid = SUMX('Table', 'Table'[Unids Prod])
VAR result = unid - unida
RETURN
DIVIDE(result, unida)

 

vjiewumsft_2-1714442793631.png

3.Create the measure to filter the percentage.

 

Conditional formatting = 
IF([% Cump] < 0, "red",
    IF([% Cump] >= 0 && [% Cump] < 0.1, "yellow",
        IF([% Cump] > 0.1, "green")
    )
)

 

4.Select the cump and click the conditional formatting background.

vjiewumsft_3-1714442805290.png

5.Select the Field value and conditional measure.

vjiewumsft_4-1714442830348.png

6.The result is shown below.

vjiewumsft_5-1714442837806.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

thank you, the answer that's correct 🙂 I found the solution

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors