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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
sandee
Helper I
Helper I

Nested If DAX with AND / OR DAX in calculated column

Hi Everyone,

 

Please can you help and advise.

 

i have customer data based on salary i have to create a category for Silver , Gold Diamond

Salary range starts from 10,000 to 1000,000.

when i building this i am only getting Silver Category, i do not know as what is wrong am doing ....

Please can you include AND dax also OR dax inside IF dax. many thanks for your support in advance.

1 ACCEPTED SOLUTION
themistoklis
Community Champion
Community Champion

@sandee 

 

You can create a new column (not measure) and add the following rules

 

 

Column =
IF (
    Table[amount] >= 0
        && Table[amount] < 30000,
    "Silver",
    IF (
        Table[amount] > 30000
            && Table[amount] < 80000,
        "Gold",
        IF (
            Table[amount] > 80000
                && Table[amount] < 100000,
            "Platinum"
        )
    )
)

 

 

OR  

 

 

Column =(
SWITCH( TRUE(),
Table[amount] >= 0 && Table[amount] < 30000, "Silver",
Table[amount] >= 30000 && Table[amount] < 80000, "Gold",
Table[amount] >= 80000 && Table[amount] < 100000, "Platinum",
"Other"
)

 

 

View solution in original post

2 REPLIES 2
themistoklis
Community Champion
Community Champion

@sandee 

 

You can create a new column (not measure) and add the following rules

 

 

Column =
IF (
    Table[amount] >= 0
        && Table[amount] < 30000,
    "Silver",
    IF (
        Table[amount] > 30000
            && Table[amount] < 80000,
        "Gold",
        IF (
            Table[amount] > 80000
                && Table[amount] < 100000,
            "Platinum"
        )
    )
)

 

 

OR  

 

 

Column =(
SWITCH( TRUE(),
Table[amount] >= 0 && Table[amount] < 30000, "Silver",
Table[amount] >= 30000 && Table[amount] < 80000, "Gold",
Table[amount] >= 80000 && Table[amount] < 100000, "Platinum",
"Other"
)

 

 

Thank you so much for making this so beautiful, the result make me so happy, I LOVE DAX. thanks again.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.