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

Nested IF AND Statement/Conditional Column

Hello all, 

 

I'm a bit stuck and could some help with creating a conditional column or DAX nested IF statement.

 

Columns 

  • Progress (Not Started, Started, Completed)
  • Start Date
  • Complete Date
  • Due Date

 

I need to create a conditional column or if statement to reflect accurate progress status. The current progress status column is populated by users and can be left blank. Therefore, even if a date is populated in the Start Date column, the status in the Progress column might reflect Not Started. 


I need a column that does the following:

 
> If Start Date field is not null and the Completed Date is not populated, the status of the Progress column should be populated as In Prorgress

> If Start Date field is not null and the Completed Date is not null, the status of the Progress column should be populated as Completed

 

There doesn't seem to be a way to add an AND statement to a conditional column. Is this something that could be written in a DAX statement? 

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Continued Contributor
Continued Contributor

Re: Nested IF AND Statement/Conditional Column

@levelup 

 

Go to Powerquery -->Add Column -->Custom Column, and write below in your windown, name this column as "Progress"

 

if [Start Date] <> null and [Complete Date] = null then "In Progress" else if [Start Date] <> null and [Complete Date] <> null then "Completed" else ""

 

Let me know if this makes sense.

View solution in original post

4 REPLIES 4
Highlighted
Continued Contributor
Continued Contributor

Re: Nested IF AND Statement/Conditional Column

@levelup 

If you want to do that in the Powequery, you can create custom column.

 

If you want to do that in DAX environment, you can do that also.

Highlighted
Helper I
Helper I

Re: Nested IF AND Statement/Conditional Column

Thank you @mhossain ! I think a column would be best, but I'm not sure how to go about structing the formula. 

Highlighted
Continued Contributor
Continued Contributor

Re: Nested IF AND Statement/Conditional Column

@levelup 

 

Go to Powerquery -->Add Column -->Custom Column, and write below in your windown, name this column as "Progress"

 

if [Start Date] <> null and [Complete Date] = null then "In Progress" else if [Start Date] <> null and [Complete Date] <> null then "Completed" else ""

 

Let me know if this makes sense.

View solution in original post

Highlighted
Helper I
Helper I

Re: Nested IF AND Statement/Conditional Column

Thank you @mhossain , that made sense and works perfectly! I added a few more clauses and it is exactly what I needed. 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors