Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
LithanaM
Frequent Visitor

Filtering ID & date compared within two date columns and many lines for this ID

Hi beautiful community, 

I have a question that I am not sure can be solved, but there are so many possibilities with PBI and so high skilled people in there that I am taking a chance 🙂

I am following several students stages with a beginning of stage date and end of stage date through different stages.

Below the exemple of one Student.

The data have been cumulated each year and unfortunately, I have some stages that were projected and did not happen that are still in the Database.

Date where in the column FinStage-RecMin will be above zero are projections, but some of them are to be kept them

For each selected student, I have to eliminate stages where the projected start dates (FinStage-RecMin>0) are already included in another stage for this student.

 

In the example below, I have to eliminate the line 28 juillet 2020 (FinStage-RecMin= 276) that is included in the stage 27 juillet to 27 September (in the line above).

 

Is there a way to do that?

 

Thank you all for your help!

 

Nathalie

 

LithanaM_0-1659477690866.png

 

 

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @LithanaM 

 

If you are trying to eliminate the (FinStage-RecMin>0) rows, you can try the following method.

Original table:

vzhangti_0-1659678706367.png

Table:

Table 2 = 
Var table1=SUMMARIZE('Table','Table'[Date],'Table'[FinStage-RecMin],'Table'[Stage])
Var table2=FILTER(table1,[FinStage-RecMin]<=0)
return
table2

vzhangti_1-1659678767236.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Bonjour, 

Unfortunately, I can't just eliminate the >0 lines, because some of them are unique and have to be kept.

I actually work with historical data that were cumulated and where duplicates were eliminated, but it was not always the most recent entries that were kept, hence the problem I am having now....

I didn't have an example in this table, but I can have a finstage-recmin>0 but that does not exist in other instances and need to be kept.

Nathalie

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.