cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shinjit Frequent Visitor
Frequent Visitor

Multiple IF

Hola;

Necesito segmentar datos en 4 o 5 categorías diferentes (<10, >10, >15, >30), doy un ejemplo sencillo:

 

Persona   Edad     SEGMENTACION

    A            5                    <10

    B            29                   >15

    C           13                    >10

    D           55                   >30   

    E            14                   >10

 

Actualmente uso:

Antigüo = IF(BajadaVBobina[EDAD]<10,"<10",IF(BajadaVBobina[Antiguedad]<15,"<15",">15"))
 
Pero necesito realizar más condiciones y no me lo permite.
Gracias
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Multiple IF

You could use nested IF statements, but I would use a SWITCH(TRUE()...) statement.


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: Multiple IF

You could use nested IF statements, but I would use a SWITCH(TRUE()...) statement.


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

v-cherch-msft Super Contributor
Super Contributor

Re: Multiple IF

Hi @shinjit 

 

Try below formula:

Column = 
IF (
    Table3[Edad] < 10,
    "<10",
    IF (
        Table3[Edad] > 10
            && Table3[Edad] < 15,
        ">10",
        IF ( Table3[Edad] > 15 && Table3[Edad] < 30, ">15", ">30" )
    )
)

or

Column 2 = 
SWITCH (
    TRUE (),
    Table3[Edad] < 10, "<10",
    Table3[Edad] > 10
        && Table3[Edad] < 15, ">10",
    Table3[Edad] > 15
        && Table3[Edad] < 30, ">15",
    ">30"
)

Regards,

Cherie

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

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 280 members 3,043 guests
Please welcome our newest community members: