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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
priyaMungara
Regular Visitor

duplicate entries for consecutive days

I have two columns  - id and date(some consecutive days). 

 

ID  date

1    08/03/17

1    08/04/17

2     08/03/17

2    08/04/17

3   08/03/17

3   08/04/17

 

 

What I want to find out is 

 

08/03/17 - 3 (distinct count of ids)

               -  0 (distinct count of ids that are in common with today and previous day)

08/04/17 -3 (distinct count of ids)

               -  2 (distinct count of ids that are in common with today and previous day)

Please do let me know if there is any way to do this

 

1 ACCEPTED SOLUTION

Hi @priyaMungara

 

Not very sure for your calculate steps.
On my side, I get the different analysis result.

 

Summary table:

Table = ADDCOLUMNS(SUMMARIZE('sample',[date],"Distict ID",COUNTROWS(VALUES('sample'[ID]))),"Previous",CALCULATE(COUNTROWS(VALUES('sample'[ID])),'sample'[date]<EARLIER('sample'[date]))+0)

8.PNG

 

Regards,

XIaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
priyaMungara
Regular Visitor

I have two columns  - id and date(some consecutive days). 

 

ID  date

1    08/03/17

1    08/04/17

2     08/03/17

2    08/04/17

3   08/03/17

3   08/04/17

 

 

What I want to find out is 

 

08/03/17 - 3 (distinct count of ids)

               -  0 (distinct count of ids that are in common with today and previous day)

08/04/17 -3 (distinct count of ids)

               -  2 (distinct count of ids that are in common with today and previous day)

Please do let me know if there is any way to do this

 

Hi @priyaMungara

 

Not very sure for your calculate steps.
On my side, I get the different analysis result.

 

Summary table:

Table = ADDCOLUMNS(SUMMARIZE('sample',[date],"Distict ID",COUNTROWS(VALUES('sample'[ID]))),"Previous",CALCULATE(COUNTROWS(VALUES('sample'[ID])),'sample'[date]<EARLIER('sample'[date]))+0)

8.PNG

 

Regards,

XIaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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