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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Identify Unique ids based on two month periods

I am trying to re-create  "New case" in power bi that would identify as Yes if its is the first new entry of a uniqe case ID. 

 

the Column would be as below

 

Uniqe Case ID Date LoggedCompleted DateReport MonthNew Cases
 ID12020-01-21-JanYes
 ID12020-01-21-FebNo
 ID12020-01-212020-03-22MarchNo
 ID22020-02-01-FebYes
 ID22020-02-012020-03-02MarchNo
 ID32020-03-012020-03-12MarchYes
 ID42020-01-012020-01-09JanYes

 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi  @Anonymous 

For your case, you need add a Report Month No column in the table.

for example, you could use this formula to get it.

Report Month No = SWITCH('Table'[Report Month],
"Jan",1,
"Feb",2,
"March",3
)

2.JPG

 

Then use this formula to get the expected output column:

Result New cases = 
IF( CALCULATE(MIN('Table'[Report Month No]),FILTER('Table','Table'[Uniqe Case ID]=EARLIER('Table'[Uniqe Case ID])))='Table'[Report Month No],"Yes","No")

Result:

3.JPG

 

and here is sample pbix file, please try it

 

Regards,

Lin

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

View solution in original post

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

hi  @Anonymous 

For your case, you need add a Report Month No column in the table.

for example, you could use this formula to get it.

Report Month No = SWITCH('Table'[Report Month],
"Jan",1,
"Feb",2,
"March",3
)

2.JPG

 

Then use this formula to get the expected output column:

Result New cases = 
IF( CALCULATE(MIN('Table'[Report Month No]),FILTER('Table','Table'[Uniqe Case ID]=EARLIER('Table'[Uniqe Case ID])))='Table'[Report Month No],"Yes","No")

Result:

3.JPG

 

and here is sample pbix file, please try it

 

Regards,

Lin

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

Hi @Anonymous ,

 

Your requirement is not complete as you haven't mentioned how the first new entry against a Unique Case ID is considered.

Is it based on Report Month or somehting using Date Logged and Completed Date?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

What i am trying to capture in each report month is when the unique ID was first loggged  based on date logged.

So if it was logged in  Jan, then in report month it should identify it as a new case. where as if it was logged in in March, then the report month for March should identify it as a new case.

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors