cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nguyendaithang Frequent Visitor
Frequent Visitor

Count of Repeated ID

I. QUESTION

I am looking for a DAX formula that return me the number of ID which appear in 2,3,4......consecutive months

ID    Month

A1       1/1/2018

A2      1/3/2018     

A3      1/15/2018

A4      2/1/2018

A1      2/4/2018

A5      2/14/2018  

A3       2/15/2018

A1       3/1/2018

A4       1/3/2018

 

II. RESULT

 

So the result I want as belows:

1. The number of ID which appear in 2 consecutive months: 1 & 2/2018 is 2 (A1 & A3)

ID         Month

A1       1/1/2018

A3      1/15/2018

A1      2/4/2018

A3       2/15/2018

2. The number of ID which appear in 3 consecutive months: 1, 2 & 3/2018 is 1 (A1)

ID         Month

A1       1/1/2018

A1      2/4/2018

A1       3/1/2018

 

 

 

1 REPLY 1
Community Support Team
Community Support Team

Re: Count of Repeated ID

@nguyendaithang,

 

You may check if the following post helps.

https://community.powerbi.com/t5/Desktop/Find-min-date-where-continuous-8-rows-of-data-in-the-calcul...

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 129 members 1,794 guests
Please welcome our newest community members: