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 IV
Super User IV

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 IV
Super User IV

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 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors