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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

due date passed and status is not done

Hi All,

 

I'm trying to create a column that will show the due date, if the status is not done.

 

so the data I have is similar to this:

Due_dateStatus
12/03/2022New
13/03/2022Inprogress
13/03/2022Done
14/03/2022Done
15/03/2022Inprogress
16/03/2022New

 

What I want to do is only capture those which are either new or inprogress, after the due date has passed, so in this example it would populate the first 2 and last 2.

 

I have this so far 

due date passed = IF(ISBLANK(Task[DUE_DATE]), BLANK(), if(Task[ISSUE_STATUS_NAME] = Task[Done], BLANK(), Task[DUE_DATE]))
but it errors, because DAX doesn't support type text with a type integer.
 
Can someone point out the error of my ways?
 
Thanks,
Jeff

 

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

According to this:

What I want to do is only capture those which are either new or inprogress, after the due date has passed, so in this example it would populate the first 2 and last 2.

 

It seems that you want to show rows where the date is not blank and the status <> Done, right?

If so, as @amitchandak mentioned, please create a flag measure ,and then apply it to visual-filter pane, set as "is 1":

Flag Measure = IF(MAX('Table'[Due_date])<>BLANK()&&MAX('Table'[Status])<>"Done",1,0)

 

Eyelyn9_0-1648182574955.png

 

Best Regards,
Eyelyn Qin
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

7 REPLIES 7
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

According to this:

What I want to do is only capture those which are either new or inprogress, after the due date has passed, so in this example it would populate the first 2 and last 2.

 

It seems that you want to show rows where the date is not blank and the status <> Done, right?

If so, as @amitchandak mentioned, please create a flag measure ,and then apply it to visual-filter pane, set as "is 1":

Flag Measure = IF(MAX('Table'[Due_date])<>BLANK()&&MAX('Table'[Status])<>"Done",1,0)

 

Eyelyn9_0-1648182574955.png

 

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

Anonymous
Not applicable

@amitchandrak i see that if the due date field is empty, it puts a 1 in the new column, how can i get around that?

Anonymous
Not applicable

@amitchandak 

due date passed = IF(Task[DUE_DATE] <= TODAY() && Task[ISSUE_STATUS_NAME] <> "Done",1,0)
 
It populated the new column with 31/12/1899 😄
 
Which I do not understand at all
amitchandak
Super User
Super User

@Anonymous , Try a measure like

countrows(Filter(Table, Table[Due_date] <= today() && Table[Status] <> Done ))

Anonymous
Not applicable

@amitchandak 

 

Hi Amit,

 

due date = countrows(Filter(Task, Task[Due_date] <= today() && Task[ISSUE_STATUS_NAME] <> "Done" ))
 
it populated the field with 973, I'm guessing because there are 973 which match that query, I don't want a count of how many there are, but a way to flag entries that fail the either one of the queries
 
Thanks,
 
Jeff

@Anonymous , means a new column as flag

 

if( Table[Due_date] <= today() && Table[Status] <> "Done", 1, 0)

Anonymous
Not applicable

@amitchandrak that was my fault, had it set as a date.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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