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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
lc1
Helper III
Helper III

Remove duplicates if condition is met

Hello,

I have two columns (Project Id) and (Fund).

I need to filter only projects that are funded 100% by PTP not partially funded.

Can someone advise the best way to obtain these results?

Thank you.

 

Proj IDFund 
75636PTPOk
3000020Grant 
3000020PTP 
3000020Operating 
3002541Operating 
3003301PTP 
3003301Grant 
3003861PTPOk
9 REPLIES 9
Anonymous
Not applicable

Hi @lc1 ,

 

May I ask if the solution mentioned in the link you provided helped you?

 

Best Regards,
Adamk Kong

Hi, it did but not completely. But I still found it very useful.

For the task that I had, since I had a tight deadline, I ended up doing it in excel.

lc1
Helper III
Helper III

Good morning,

As mentioned before, the recommendations provided do not bring the expected results. I appreciate your help.

I wish I could've sent a sample of the file but since it has multiple tables related it is very time consuming to recreate.

However, here is a link I found that might help others with a similar problem:

Solved: Re: If Duplicate Value In Column vs Distinct Occur... - Microsoft Fabric Community

Ashish_Mathur
Super User
Super User

Hi,

Write these measures

Financier count = DISTINCTCOUNT(Data[Fund])
Test = 1*(AND([Financier count]=1,MIN(Data[Fund])="PTP"))

Drag the Test measure to the filter section and apply a condition of 1.

Hope this helps.

Ashish_Mathur_0-1721174087118.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ThxAlot
Super User
Super User

ThxAlot_0-1721159704787.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



NaveenGandhi
Super User
Super User

Hi @lc1 

Please use below measure.

PTP=
VAR PTPProjects =
    SUMMARIZE(
        FILTER(
            'table',
            CALCULATE(
                COUNTROWS('table'),
                ALLEXCEPT('table', 'table'[Proj ID])
            ) = CALCULATE(
                COUNTROWS('table'),
                ALLEXCEPT('table', 'table'[Proj ID]),
                'table'[Fund] = "PTP"
            )
        ),
        'table'[Proj ID]
    )
RETURN
    if(SELECTEDVALUE('Table'[Proj ID]) IN PTPProjects,"Ok","")
NaveenGandhi_0-1721154844873.png

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

Follow me on LinkedIn!!!




gmsamborn
Super User
Super User

Hi @lc1 

 

Would a measure like this help?

 

Flag = 
VAR _Proj = MAX( 'Table1'[Proj ID] )
VAR _Table =
    FILTER(
        ALL( 'Table1' ),
        'Table1'[Proj ID] = _Proj
    )
VAR _All = COUNTROWS( _Table )
VAR _PTP = 
    COUNTROWS(
        FILTER(
            _Table,
            'Table1'[Fund] = "PTP"
        )
    )
VAR _Logic = IF( _All = _PTP, 1 )
RETURN
    _Logic

 

That flag can be used to filter your visual.

 

Remove duplicates if condition is met.pbix

 



Proud to be a Super User!

daxformatter.com makes life EASIER!

Thank you all for the responses, I tried the various solutions but could not get the results I'm looking for.

I should've mentioned I'm working with data coming from 4 different tables:

Table 1Table 2Table 3Table 4 
Completion DateTotal Expenditures*Project ID* Revenue Name
    
* Distinct value (key)  

 

I need to create two matrixes, one with a list of projects that are 100% funded by Revenue type 1 and one table with projects that are fully and partially funded with Revenue type 1.

 

Meaning, the second table should have all projects funded 100% with Rev type 1 in addition to other projects funded with other types of revenue.

 

Hi @lc1 

 

I would like to help but I'm a little unclear about your requirements.

 

Can you provide the following?

 

1)  Please provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...

 

2) Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

 

3) Please explain how you would expect to get from step 1 to 2.

 

4) If possible, please show your past attempts at a solution.

 

 

A .pbix file with sample data would be best.



Proud to be a Super User!

daxformatter.com makes life EASIER!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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