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

Before a date

Attached i have a snap shot of a straight table. I am trying to eliminate any date before the date Today - 2 days (Two Days Ago).

Below is the expression that gave me the snap shot of the straight table.

Count({<DEPT={"44840"}, epic_status-= {"Not Required", "Done"}, project_name-={"PMO IMS Pipeline","PMO Test"}>}issue_due_date)

I need to add something like "issue_due_date >= today()-2" somewhere into equation above.

Can anyone tell me how I can get this ("issue_due_date >= today()-2") into the above equation?

17 Replies
trdandamudi
Master II
Master II

I am sorry, I am not getting it. Can you paste a screen shot and explain please....

mparker123
Creator
Creator
Author

I figured it out i just put this "=If(issue_due_date>=today()-2,issue_due_date)" as a calculated demsions and left the other expression had i had it.

But now do you know how to text format a calculated dimension to show a date format of 'MM/DD/YYYY'

vishsaggi
Champion III
Champion III

Try

= If( issue_due_date>=today()-2, Date(Floor(issue_due_date), 'MM/DD/YYYY'))

Anonymous
Not applicable

A calculated dimension would work but may perform less optimally that this:

You would put this as your set analysis:

issue_due_date={'>=$(=today()-2)'}


Also I probably wouldn't count the date field.  I would count project name or project id if there is one.

mparker123
Creator
Creator
Author

That didn't work in my set analysis it returned a blank display. I do like the idea of count(project name) instead of date. Is there anything else I could try.

Also, I am trying to set a format for the calculated dimension. My date field is a time stamp. I want to make it just 'MM/DD/YYYY'?

I tried the guys above and it returned some dates in the correct format but some in numbers.

vishsaggi
Champion III
Champion III

Try this?

= If( issue_due_date>=today()-2, Date(Num(Floor(issue_due_date)), 'MM/DD/YYYY'))

Anonymous
Not applicable

You'd be best off creating a date only field in your script.  That's probably why you're having so much trouble.

Something like:

date(floor(issue_due_date),'M/D/YYYY') as [Issue Due Date]

And then use that field in your expressions and set analysis. 

mparker123
Creator
Creator
Author

Thank you all for your help I found the solution to my problem. Below are the two expressions i used to solve my problem

Exprssion:

Count({<DEPT={"44840"}, epic_status-= {"Not Required", "Done"}, project_name-={"PMO IMS Pipeline","PMO Test"}>}epic_summary)

Calculated Deminsion:

=Date(If(epic_due_date>=today()-2,epic_due_date),'MM/DD/YYYY')