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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.