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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
fusion1966
New Member

Necesidad de crear una columna con agrupaciones basadas en los valores de otra columna

Soy relativamente nuevo en Power BI, por lo que algunos consejos serían geniales.

Tengo una columna calculada que calcula el número de días a partir de hoy que una solicitud ha sido con mi equipo.

Lo que quiero hacer es clasificar el número de valores de días en grupos:

Verde: menos de 120 días

Amarillo 120-149 días

Naranja 150-180 días

Rojo a más de 180 días

Las agrupaciones verdes y rojas son bastante fáciles y he escrito la siguiente fórmula:

días tomados grupo : IF('Finance Instructions Received'[Días en curso]>180, "Red", IF('Instrucciones de financiación recibidas'[Días en curso]<120, "Verde"))
Sin embargo, estoy luchando para incluir los grupos amarillo y naranja en la fórmula.
¿Puede alguien mostrarme cómo debe escribirse esta fórmula, por favor?
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@fusion1966 , Probar como

Switch( true(),
'Instrucciones financieras recibidas'[Días en curso] < 120 , "Verde",
'Instrucciones financieras recibidas'[Días en curso] < 150 , "Amarillo",
'Instrucciones financieras recibidas'[Días en curso] < 180 , "Naranja",
"Rojo")

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

parry2k
Super User
Super User

@fusion1966 añadir su cálculo de esta manera

SWTICH ( TRUE(),
Table[Column] > 180, "Red",
Table[Column] > 150, "Orange",
Table[Column] > 120, "Yellow",
"Green"
)

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 relacionadas 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

4 REPLIES 4
v-jayw-msft
Community Support
Community Support

Hola @fusion1966 ,

Comprobar

Column =
IF (
    'Finance Instructions Received'[Days Ongoing] < 120,
    "Green",
    IF (
        'Finance Instructions Received'[Days Ongoing] >= 120
            && 'Finance Instructions Received'[Days Ongoing] < 150,
        "Yellow",
        IF (
            'Finance Instructions Received'[Days Ongoing] >= 150
                && 'Finance Instructions Received'[Days Ongoing] <= 180,
            "Orange",
            "Red"
        )
    )
)

Saludos

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

gracias a todos, que funcionó perfectamente!

parry2k
Super User
Super User

@fusion1966 añadir su cálculo de esta manera

SWTICH ( TRUE(),
Table[Column] > 180, "Red",
Table[Column] > 150, "Orange",
Table[Column] > 120, "Yellow",
"Green"
)

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 relacionadas 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.

amitchandak
Super User
Super User

@fusion1966 , Probar como

Switch( true(),
'Instrucciones financieras recibidas'[Días en curso] < 120 , "Verde",
'Instrucciones financieras recibidas'[Días en curso] < 150 , "Amarillo",
'Instrucciones financieras recibidas'[Días en curso] < 180 , "Naranja",
"Rojo")

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Solution Authors