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
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
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.