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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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