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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply

Error formula

 

 

Does anyone know why this formula doesn't work correctly, if I have it right and it works similarly in excel?
I need to validate if 3 columns have "Yes" and if this occurs the process is "Yes", if there is any no it will be "No".

Thank you

 

Correct: Yes or No = IF(
    AND(
        [CKT Populated?] = "Yes",
        [PTT Name Populated?] = "Yes",
        [PTT Ticket Populated?] = "Yes"),
    "Yes",
    "No"
)
 
another example that is not working
 
Correct: Yes or No = VAR col1 = SELECTEDVALUE('Sheet1'[CKT Populated?])  ;
VAR col2 = SELECTEDVALUE('Sheet1'[PTT Name Populated?])  ;
VAR col3 = SELECTEDVALUE('Sheet1'[PTT Ticket Populated?])  ;

IF(
  AND(col1 = "YES", col2 = "YES", col3 = "YES"),
  "YES","No")
 
Many tks all
3 ACCEPTED SOLUTIONS
aduguid
Super User
Super User

I would create the following calculated columns to check each column value by itself.

Check CKT = IF([CKT Populated?] = "Yes", "Yes", "No")
Check PTT Name = IF([PTT Name Populated?] = "Yes", "Yes", "No")
Check PTT Ticket = IF([PTT Ticket Populated?] = "Yes", "Yes", "No")

 

View solution in original post

xifeng_L
Super User
Super User

Hi @FelippeAzevedo7 ,

 

The AND function in DAX supports only two arguments. (https://learn.microsoft.com/en-us/dax/and-function-dax)

 

xifeng_L_0-1716821219247.png

 

So you can change the formula to the following form:

 

Correct: Yes or No = IF(
    AND(
        AND(
            [CKT Populated?] = "Yes",
            [PTT Name Populated?] = "Yes"
        ),
        [PTT Ticket Populated?] = "Yes"
    ),
    "Yes",
    "No"
)

 

Or use the logical operators &&:

 

Correct: Yes or No = 
IF(
    [CKT Populated?] = "Yes" && 
        [PTT Name Populated?] = "Yes" &&
            [PTT Ticket Populated?] = "Yes",
    "Yes",
    "No"
)

 

 

Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

 

View solution in original post

Hello xifeng_L

 

How are you?

I will use the formula to solve my problem.

Many tks for your support

View solution in original post

5 REPLIES 5
xifeng_L
Super User
Super User

Hi @FelippeAzevedo7 ,

 

The AND function in DAX supports only two arguments. (https://learn.microsoft.com/en-us/dax/and-function-dax)

 

xifeng_L_0-1716821219247.png

 

So you can change the formula to the following form:

 

Correct: Yes or No = IF(
    AND(
        AND(
            [CKT Populated?] = "Yes",
            [PTT Name Populated?] = "Yes"
        ),
        [PTT Ticket Populated?] = "Yes"
    ),
    "Yes",
    "No"
)

 

Or use the logical operators &&:

 

Correct: Yes or No = 
IF(
    [CKT Populated?] = "Yes" && 
        [PTT Name Populated?] = "Yes" &&
            [PTT Ticket Populated?] = "Yes",
    "Yes",
    "No"
)

 

 

Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

 

Hi

 

Tested and worked fine!!

 

Correct: Yes or No =
IF(
[CKT Populated?] = "Yes" &&
[PTT Name Populated?] = "Yes" &&
[PTT Ticket Populated?] = "Yes",
"Yes",
"No"
)

Tks a lot

Hello xifeng_L

 

How are you?

I will use the formula to solve my problem.

Many tks for your support

aduguid
Super User
Super User

I would create the following calculated columns to check each column value by itself.

Check CKT = IF([CKT Populated?] = "Yes", "Yes", "No")
Check PTT Name = IF([PTT Name Populated?] = "Yes", "Yes", "No")
Check PTT Ticket = IF([PTT Ticket Populated?] = "Yes", "Yes", "No")

 

Hello

 

Many tks for the feedback.

I'm still not as good with power BI as I am with excel.
Thanks

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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