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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

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
Greg_Deckler
Community Champion
Community Champion

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



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous 

 

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.
Greg_Deckler
Community Champion
Community Champion

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



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors