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

Filtering for a unique value but specific date requirements

I have a table which is pulled from our ticketing system and my goal is to create a couple metrics for reporting. In order to create one of my metrics, I need to generate a measure that I will call Days to Resolve (i.e. Resolved date - Created Date, the number will be an integer that will calculate how many days it took to resolve a ticket. 

These four columns I am working with. 

RITM #Request #Created DateResolved Date
RITM0123456REQ0444442021-01-042021-01-04
RITM0123987REQ0444442021-01-042021-01-04
RITM0234567REQ0444442021-01-042021-01-07

 

dnExplorer71_0-1628019019232.png

 

I want to be able to remove duplicate Request # so this column has only unique values.  At the same time, the record should have the earliest Created Date and the Latest Resolved Date.  So my table would look like this:

REQ0444442021-01-04

2021-01-07

dnExplorer71_1-1628019040892.png

 

 

It's simple to do conceptually and just by looking but I'm not sure how to perform this in Power BI. 

I tried remove duplicates in the second column but Power Bi doesn't know I want 2021-01-07.  I looked all over power query but couldn't find anything that can help me.  I'm still a novice with DAX.  Is there a feature in power query that can help me or is DAX the only way?  Can someone please help me?

 

 



1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Anonymous following image gives what I mean, I'm using column name from my table, in your case, it will be different column based on your table:

 

parry2k_0-1628023642219.png

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@Anonymous following image gives what I mean, I'm using column name from my table, in your case, it will be different column based on your table:

 

parry2k_0-1628023642219.png

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Wow that was a lot simplier than I had expected.  I spent quite a bit of time searching online, so thank you!

parry2k
Super User
Super User

@Anonymous in PQ, use group by, get min of created date and max of resolved date and group it by request # and that will do it.

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.

Top Solution Authors