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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.