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
Orlando_Tuga
Helper I
Helper I

Going Crazy with a stupid thing for sure

Hi all

I am new in power bi and using it for a couple of weeks and learning with google and youtube 🙂

 

Can anyone help me as i have an error : 'The syntax for ',' is incorrect. (DAX( IF(.....'

the comands are very basic and i use them for a new colum:

 

Robot_TtF =
    IF(
        AND( EPCC_Cases[Title]<>BLANK() , EPCC_Cases[RepairType]="In House" ) ,

        IF(
            OR( EPCC_Cases[Status]="Closed" , EPCC_Cases[Status]="Shipped to Customer" ) ,

            IF(
                AND( EPCC_Cases[DateReceivedAtEPCC]<>blank , EPCC_Cases[DateShipped]<>BLANK() ) ,

                DATEDIFF(EPCC_Cases[DateReceivedAtEPCC].[Date] , EPCC_Cases[DateShipped].[Date] , DAY) ,
               
                IF(
                    EPCC_Cases[DateReceivedAtEPCC]=BLANK() ,
                    1000 ,
                    IF(
                        EPCC_Cases[DateShipped]=BLANK() ,
                        2000
                    )
                )
            ) ,

            IF(
                EPCC_Cases[DateReceivedAtEPCC]<>BLANK() ,
                DATEDIFF(EPCC_Cases[DateReceivedAtEPCC].[Date] , TODAY() , DAY) ,
                4000
            )
        ) ,

        5000

    )
 
Can any one help me and see were the error is as i am not.
Thanks
2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Orlando_Tuga ,

 

Try using the following expression:

Robot_TtF =
IF(
    AND(EPCC_Cases[Title] <> BLANK(), EPCC_Cases[RepairType] = "In House"),
    IF(
        OR(EPCC_Cases[Status] = "Closed", EPCC_Cases[Status] = "Shipped to Customer"),
        IF(
            AND(EPCC_Cases[DateReceivedAtEPCC] <> BLANK(), EPCC_Cases[DateShipped] <> BLANK()),
            DATEDIFF(EPCC_Cases[DateReceivedAtEPCC], EPCC_Cases[DateShipped], DAY),
            IF(
                EPCC_Cases[DateReceivedAtEPCC] = BLANK(),
                1000,
                IF(
                    EPCC_Cases[DateShipped] = BLANK(),
                    2000
                )
            )
        ),
        IF(
            EPCC_Cases[DateReceivedAtEPCC] <> BLANK(),
            DATEDIFF(EPCC_Cases[DateReceivedAtEPCC], TODAY(), DAY),
            4000
        )
    ),
    5000
)

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

It worked, was it due to the spaces?

View solution in original post

6 REPLIES 6
Orlando_Tuga
Helper I
Helper I

Tried it and does not work.

 

Anonymous
Not applicable

Hi @Orlando_Tuga ,

 

Try using the following expression:

Robot_TtF =
IF(
    AND(EPCC_Cases[Title] <> BLANK(), EPCC_Cases[RepairType] = "In House"),
    IF(
        OR(EPCC_Cases[Status] = "Closed", EPCC_Cases[Status] = "Shipped to Customer"),
        IF(
            AND(EPCC_Cases[DateReceivedAtEPCC] <> BLANK(), EPCC_Cases[DateShipped] <> BLANK()),
            DATEDIFF(EPCC_Cases[DateReceivedAtEPCC], EPCC_Cases[DateShipped], DAY),
            IF(
                EPCC_Cases[DateReceivedAtEPCC] = BLANK(),
                1000,
                IF(
                    EPCC_Cases[DateShipped] = BLANK(),
                    2000
                )
            )
        ),
        IF(
            EPCC_Cases[DateReceivedAtEPCC] <> BLANK(),
            DATEDIFF(EPCC_Cases[DateReceivedAtEPCC], TODAY(), DAY),
            4000
        )
    ),
    5000
)

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

Thanks

It worked, was it due to the spaces?

Anonymous
Not applicable

Hi @Orlando_Tuga ,

 

The main reason is the Date.

 

Best regards,
Community Support Team_ Scott Chang

Jihwan_Kim
Super User
Super User

Hi,

If your setting shows "," as error, please try ";" 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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