The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi there!
I'm helping a colleague project manager and sometimes, when creating a new project, the database gives twice the same Project number to 2 different projects.
I want him to be able to find this information quickly through the Report I'm building for him.
The idea would be to create a separate page where he could see all the duplicates and then correct the database if necessary.
So my idea was to either create a column in my data, that would add "1" on each row with a duplicate, or to use a measure.
The tricky thing is that there's a status linked to this project, so I need to count a duplicate only when the project number and the status are identical (sometimes we keep the same project number for two projects on purpose, and we change the status).
I've managed to count duplicates for the project number, with this column formula:
So if I use it in a visual with a table, with the status and the project number, I get this:
N° project | Status | Duplicate |
34350 | On-going | 2 |
36884 | On-going | 2 |
38857 | Won | 1 |
38857 | Won other project | 1 |
40433 | On-going | 2 |
As you can see, the n°34350 exists twice with the on-going status, so there's one line. However, the 38857 appears on two rows ith its two different status. If I find the right formula for the column, it shouldn't appear at all.
I want to end up with this:
N° project | Status | Duplicate |
34350 | On-going | 2 |
36884 | On-going | 2 |
40433 | On-going | 2 |
I've tried this formula to upgrade the column with an additional condition on the status:
Duplicata N°Projet = IF(COUNTROWS(Projects), FILTER ( Projects, Projects[N° project] = EARLIER ( Projects[N° project] ),FILTER(Projects,Projects[Status] ) )
>But there are too many arguments for the filter function.
I've tried a few measures, such as:
Solved! Go to Solution.
If you want to extend the FITLER comparison to check both the project number and the status you can use the && operator which does a logical AND.
eg.
Thank you! That worked fine (I had tried only with one & and without the 2nd earlier).
If you want to extend the FITLER comparison to check both the project number and the status you can use the && operator which does a logical AND.
eg.