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
Syndicate_Admin
Administrator
Administrator

Count duplicates and power according to date range

Hello everyone, I am new to pbi and I have a doubt that I have not been able to solve for days. I have a table as follows:

nombre_ID | SN | date

S-YB90 001101

J-DS88 10101

S-YB90 001101

S-YB90 102133

and I have to count how many times it repeats nombre_ID = S-YB90 but if the SN is different, so in this example they are 2 times

With the following I have been able to tell it:

CALCULATE(COUNT(IMEI_Duplicados[SN]),ALLEXCEPT(IMEI_Duplicados,IMEI_Duplicados[nombre_ID]))
But the problem with this formula is that if I apply a slicer filter for example by date, it still throws me the duplicate total of the table and not the date range I select.
Do you have any suggestions?
4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

Good morning!
@jav1985
consultation... Were you able to segment the date and have it taken for you?

Syndicate_Admin
Administrator
Administrator

Hi, thank you for your time in responding, but I still have problems.

Both cases that point to me I can not make my table show the way I want.

It turns out that when changing the filter by date, it is always showing me the values of the total number of times that RegistrationNumber is repeated as long as it has a different S/N.

in the following table I manage to do something, just show the number of times RegistrationNumber is repeated as long as it has a different S/N, by applying the filter in a date range. But now, I want it to be displayed when the totals are greater than 1. if you see in the last column "RegistrationNumber count" they give me the totals but when I put it to be greater than 1 I do not get anything, I understand why to display the result in each S / N equal to 1 ...

2023_03_10_13_46_30_Estado_CAS_Spence_Power_BI_Desktop.png

So what I want to achieve now is to be able to remove the values that are in "RegistrationNumber Count" < 2

2023_03_10_14_02_29_Estado_CAS_Spence_Power_BI_Desktop.png

Ashish_Mathur
Super User
Super User

Hi,

To your Table visual, drag Nombre_ID and this measure

Measure = distinctcount(Data[SN])

Hope this helps.


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

@Syndicate_Admin , Try like

CALCULATE(COUNT(IMEI_Duplicados[SN]),filter(allselected(IMEI_Duplicados) ,IMEI_Duplicados[nombre_ID] = max(IMEI_Duplicados[nombre_ID])))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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! Prices go up Feb. 11th.

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.