Forum Discussion
Current date to week difference
Hi slapdragon,
According to your description, it seems that you want to define result based on date, right? If so, you could try to use below measure to see whether it works or not
Measure 9 =
IF (
MIN ( task[type] ) = "a",
IF (
MIN ( task[date] ) <= TODAY ()
&& MIN ( task[date] )
> TODAY () - 7,
"last one week",
IF (
MIN ( task[date] )
<= TODAY () - 7
&& MIN ( task[date] )
> TODAY () - 14,
"two week ago",
IF ( MIN ( task[date] ) <= TODAY () - 14, "no process", "" )
)
),
""
)Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- slapdragon7 years agoFrequent Visitor
I am very sorry, but I am very confused about why 'MIN' is used here. If you don't mind, would you be able to explain to me about what this does? I have tried replacing task[date] with the right values, but it didn't seem to work (I know it is my fault.)
- slapdragon7 years agoFrequent Visitor
Hi dax ,
I tried the suggested Measure, but somehow, it doesn't seem to fetch any information. The creation of the measure was successful though.
Progress = IF ( MIN ( Jira_Main_1[Status] ) = "In Progress", IF ( MIN ( Jira_Main_1[LastComment] ) <= TODAY () && MIN ( Jira_Main_1[LastComment] ) > TODAY () - 7, "Last one week", IF ( MIN ( Jira_Main_1[LastComment] ) <= TODAY () - 7 && MIN ( Jira_Main_1[LastComment] ) > TODAY () - 14, "Two Weeks ago", IF ( MIN ( Jira_Main_1[LastComment] ) <= TODAY () - 14, "No Progress", "" ) ) ), "" )I then use the newly created measure to create a stacked bar chart and all I get is "Can't display the visual". Can you help please?