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

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

Reply
Ashik008
Frequent Visitor

Excel to dax

need help with converting excel to dax

 

=IF(IF(IF(VLOOKUP([@[Service ID]],'Vendor Services Report'!A:G,7,FALSE)=0,VLOOKUP([@[Service ID]],'Vendor Services Report'!A:G,6,FALSE),VLOOKUP([@[Service ID]],'Vendor Services Report'!A:G,7,FALSE))=0,VLOOKUP([@[Service ID]],'Vendor Services Report'!A:BK,63,FALSE),IF(VLOOKUP([@[Service ID]],'Vendor Services Report'!A:G,7,FALSE)=0,VLOOKUP([@[Service ID]],'Vendor Services Report'!A:G,6,FALSE),VLOOKUP([@[Service ID]],'Vendor Services Report'!A:G,7,FALSE)))="1. High","High",IF(IF(IF(VLOOKUP([@[Service ID]],'Vendor Services Report'!A:G,7,FALSE)=0,VLOOKUP([@[Service ID]],'Vendor Services Report'!A:G,6,FALSE),VLOOKUP([@[Service ID]],'Vendor Services Report'!A:G,7,FALSE))=0,VLOOKUP([@[Service ID]],'Vendor Services Report'!A:BK,63,FALSE),IF(VLOOKUP([@[Service ID]],'Vendor Services Report'!A:G,7,FALSE)=0,VLOOKUP([@[Service ID]],'Vendor Services Report'!A:G,6,FALSE),VLOOKUP([@[Service ID]],'Vendor Services Report'!A:G,7,FALSE)))="2. Moderate","Moderate"

 

Table 1 and vendor service report has common id as "service id" column

column 6 -rating 1

column 7-Rating 2

Column 63 -old rating these are the name of the columns in the power bi .please help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Moetazzahran ,thanks for your quick reply, I will add more.

Hi @Ashik008 ,

Here's what I think the table structure is. Are you adding a new calculated column to the 'Table'?

vzhouwenmsft_0-1718785991065.png

vzhouwenmsft_1-1718786015229.png

Try this.

 

Column = 
    IF(
        IF(
            IF(
                LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID]) = 0,
                LOOKUPVALUE('Vendor Services Report'[rating1],'Vendor Services Report'[Service ID],[Service ID]),
                LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID])
            ) = 0,
            LOOKUPVALUE('Vendor Services Report'[old rating],'Vendor Services Report'[Service ID],[Service ID]),
            IF(
                LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID]) = 0,
                LOOKUPVALUE('Vendor Services Report'[rating1],'Vendor Services Report'[Service ID],[Service ID]),
                LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID])
            )
        ) = "1.High",
        "High",
        IF(
            IF(
                IF(
                    LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID]) = 0,
                    LOOKUPVALUE('Vendor Services Report'[rating1],'Vendor Services Report'[Service ID],[Service ID]),
                    LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID])
                ) = 0,
                LOOKUPVALUE('Vendor Services Report'[old rating],'Vendor Services Report'[Service ID],[Service ID]),
                IF(
                    LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID]) = 0,
                    LOOKUPVALUE('Vendor Services Report'[rating1],'Vendor Services Report'[Service ID],[Service ID]),
                    LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID])
                )
            ) = "2.Moderate",
            "Moderate",
            [else_value_if_false]
        )
    )

 

vzhouwenmsft_2-1718786056028.png

 

Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Moetazzahran ,thanks for your quick reply, I will add more.

Hi @Ashik008 ,

Here's what I think the table structure is. Are you adding a new calculated column to the 'Table'?

vzhouwenmsft_0-1718785991065.png

vzhouwenmsft_1-1718786015229.png

Try this.

 

Column = 
    IF(
        IF(
            IF(
                LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID]) = 0,
                LOOKUPVALUE('Vendor Services Report'[rating1],'Vendor Services Report'[Service ID],[Service ID]),
                LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID])
            ) = 0,
            LOOKUPVALUE('Vendor Services Report'[old rating],'Vendor Services Report'[Service ID],[Service ID]),
            IF(
                LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID]) = 0,
                LOOKUPVALUE('Vendor Services Report'[rating1],'Vendor Services Report'[Service ID],[Service ID]),
                LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID])
            )
        ) = "1.High",
        "High",
        IF(
            IF(
                IF(
                    LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID]) = 0,
                    LOOKUPVALUE('Vendor Services Report'[rating1],'Vendor Services Report'[Service ID],[Service ID]),
                    LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID])
                ) = 0,
                LOOKUPVALUE('Vendor Services Report'[old rating],'Vendor Services Report'[Service ID],[Service ID]),
                IF(
                    LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID]) = 0,
                    LOOKUPVALUE('Vendor Services Report'[rating1],'Vendor Services Report'[Service ID],[Service ID]),
                    LOOKUPVALUE('Vendor Services Report'[rating2],'Vendor Services Report'[Service ID],[Service ID])
                )
            ) = "2.Moderate",
            "Moderate",
            [else_value_if_false]
        )
    )

 

vzhouwenmsft_2-1718786056028.png

 

Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Moetazzahran
Resolver II
Resolver II

Hello @Ashik008 , 

Can you please add a dummy data sheet with the formula within it? It would great help recreate the formula in DAX. 

Thank you.

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!

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.