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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.