cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jorismo
Helper II
Helper II

Filter on record that has an differend date

Hi all,

 

I was wondering if there is an way to achieve to following:

- In my raw data I've got several customers, statusses and open_dates
- In the reports I want to select one of the customers and that the report automatically looks for the first date that is different than 'Closed' and take the firtst date of that month.

 

I've created some screenshots to explain.

The raw data:

all tickets.jpg

This is what I want to receive, a report for customer A but 
The first date that hasn't status <> Closed = 30/04/2020 so the report should take 01/04/2020 as startdate for filtering.

cust A.jpg

Example for customer B:

First date with status <> Closed 15/09/2020. So the filter should take 01/09/2020 as startdate

Screenshot_1.jpg

Exampel for customer C:

First date <> Closes = 19/01/2020. Filtering needs to be done on open_date = 01/01/2020 (so the record from 03/01/2020) should also be visible in the report.

Screenshot_2.jpg

 

I hope someone can help me on this, it would help me a LOT!

 

thanks!

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

Hi @jorismo ,

 

Create a measure as below then add it to visual filter.

Measure = 
var _min = CALCULATE(MIN('Table'[open date]),FILTER(ALLEXCEPT('Table','Table'[customer]),'Table'[status]<>"closed"))
return
IF(SELECTEDVALUE('Table'[open date])>=_min,1,0)

7.PNG

8.PNG

 

Best Regards,

Jay

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

View solution in original post

3 REPLIES 3
v-jayw-msft
Community Support
Community Support

Hi @jorismo ,

 

Create a measure as below then add it to visual filter.

Measure = 
var _min = CALCULATE(MIN('Table'[open date]),FILTER(ALLEXCEPT('Table','Table'[customer]),'Table'[status]<>"closed"))
return
IF(SELECTEDVALUE('Table'[open date])>=_min,1,0)

7.PNG

8.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
MFelix
Super User
Super User

Hi @jorismo ,

 

Do you want this calculation to be dinamic based on the selection on of other fields on top of the customer or is it only the customer?

 

You could create an auxiliar table with the customer and the first date that is not closed and then use it has your filtering.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi, 

 

sorry about the delayed response.
It's only on the Customer that I need the first date that is different than 'Closed'.

Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors