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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
avi081265
Helper III
Helper III

Argument '3' in if function is required

Hello

 

I am getting error "Argument '3' in if function is required" in following measure

MissingCertificationengineerBrasil =

IF (

    AND (Merge1[Items.Level-2]="Certification issued by Engineer",Merge1[Classifications.Country]="BRASIL" ),

    1,

    IF (

        AND (Merge1[Items.Level-2]="Certification issued by Engineer",Merge1[Classifications.Country]="NAFTA"),

        0,

if 

(

AND (Merge1[Items.Level-2]="Certification issued by Engineer ",Merge1[Classifications.Country]="europe"),

        0,

      )

  )

)

1 ACCEPTED SOLUTION
ppm1
Solution Sage
Solution Sage

Delete the comma on your last 0.

 

Pat

Microsoft Employee

View solution in original post

2 REPLIES 2
ppm1
Solution Sage
Solution Sage

Delete the comma on your last 0.

 

Pat

Microsoft Employee

Hello ppm1,

As you suggested, I removed the comman, see below code but it is now giving me another error, we just want to return 1 or 0 depending on condition. Am I missing anything?

 

"single value for column 'Items.Level-2' in table 'Merge1' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."

IF (

    AND (Merge1[Items.Level-2]="Certification issued by Engineer",Merge1[Classifications.Country]="BRASIL" ),

    1,

    IF (

        AND (Merge1[Items.Level-2]="Certification issued by Engineer",Merge1[Classifications.Country]="NAFTA"),

        0,

if 

(

AND (Merge1[Items.Level-2]="Certification issued by Engineer ",Merge1[Classifications.Country]="europe"),

        0

      )

  )

)

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors