cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jklop195 Frequent Visitor
Frequent Visitor

Problem displaying data

Hi, I have this data and I'm having trouble displaying the case number.

 

I want to display the oldest assigned date and case number based on the "pending" status. I used a formula to display the oldest date with pending status but I'm having problem displaying the case number. 

Example: I can see that the oldest case date with pending status is 6/17/19 but can't display the case number in this example being (3456-17)

 

Case NumberDate AssignedStatus
3456-176/17/19Pending
4542-296/29/19Pending
6209-245/24/19Closed
6806-294/29/19Closed
7312-044/4/19Closed
1209-096/9/19Closed
8765-057/5/19Closed
2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Problem displaying data

So, you have something like this measure?

 

Oldest Pending Date = MINX(FILTER('Cases',[Status] = "Pending"),[Date Assigned])

If you display that in a table along with this measure you should get what you need:

 

Oldest Case Number = 
VAR __min = MINX(FILTER('Cases',[Status] = "Pending"),[Date Assigned])
RETURN
MAXX(FILTER('Cases',[Date Assigned] = __min && [Status] = "Pending"),[Case Number])

 

 


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Community Support Team
Community Support Team

Re: Problem displaying data

Hi @jklop195 ,

By my tests, the formulas from Greg_Deckler should be helpful.

Capture.PNG

It seems that your formula is not similar to Greg_Deckler's and has syntax error.

Normally, if you use var function, we need use return to get the value.

If you still need help, please share your sample pbix so that we could help further on it.

You also could refer to my test pbix which has been attached.

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Super User
Super User

Re: Problem displaying data

So, you have something like this measure?

 

Oldest Pending Date = MINX(FILTER('Cases',[Status] = "Pending"),[Date Assigned])

If you display that in a table along with this measure you should get what you need:

 

Oldest Case Number = 
VAR __min = MINX(FILTER('Cases',[Status] = "Pending"),[Date Assigned])
RETURN
MAXX(FILTER('Cases',[Date Assigned] = __min && [Status] = "Pending"),[Case Number])

 

 


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

jklop195 Frequent Visitor
Frequent Visitor

Re: Problem displaying data


@Greg_Deckler wrote:

So, you have something like this measure?

 

Oldest Pending Date = MINX(FILTER('Cases',[Status] = "Pending"),[Date Assigned])

If you display that in a table along with this measure you should get what you need:

 

Oldest Case Number = 
VAR __min = MINX(FILTER('Cases',[Status] = "Pending"),[Date Assigned])
RETURN
MAXX(FILTER('Cases',[Date Assigned] = __min && [Status] = "Pending"),[Case Number])

 

 



hi,

 

I used this measure to get the oldest case;

 

Oldest Case = CALCULATE(MIN('Data'[Assigned Date]),'Data'[Status]<>"Resolved")
 
I tried what you suggested and it return with a syntax error.
 
Oldest Case Number = (DAX(var __min=minx(filter('Data',[Claim Status]<> [Resolved]),[Assigned Date])))
 
 
 
 
Community Support Team
Community Support Team

Re: Problem displaying data

Hi @jklop195 ,

By my tests, the formulas from Greg_Deckler should be helpful.

Capture.PNG

It seems that your formula is not similar to Greg_Deckler's and has syntax error.

Normally, if you use var function, we need use return to get the value.

If you still need help, please share your sample pbix so that we could help further on it.

You also could refer to my test pbix which has been attached.

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 287 members 2,913 guests
Please welcome our newest community members: