cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Return Date if condition is True

I would like to return Failed Date if, Please see sample data and my Dax formula and error message Capture.JPG

 

@Greg_Deckler 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User V
Super User V

Re: Return date if condition is True

Hello @moeconsult

You need to format your date as text as.

IF( 1=1, FORMAT( [Date], "DD/MM/YYYY" ), "No" )

Best regards
Mariusz

If this post helps,then please consider accepting it as the solution.

Please feel free to connect with me.
Linkedin

View solution in original post

2 REPLIES 2
Highlighted
Super User II
Super User II

Re: Return date if condition is True

Hello. Try adding the table name in your code as the syntax expects. As 'Table'[Column]. You cannot use [columnname]. They are reserved for measurements and not for columns.

So try:

IF (AND( TableName[Status] = "Att", TableName[Result] = "Failed"), TableName[Date], "No" )

I hope this help,



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

Happy to help!

LaDataWeb Blog


Highlighted
Super User V
Super User V

Re: Return date if condition is True

Hello @moeconsult

You need to format your date as text as.

IF( 1=1, FORMAT( [Date], "DD/MM/YYYY" ), "No" )

Best regards
Mariusz

If this post helps,then please consider accepting it as the solution.

Please feel free to connect with me.
Linkedin

View solution in original post

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors