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

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

Reply
Anonymous
Not applicable

How to get Month wise open Count , Close Count and net count

Source and Expected OutputSource and Expected Output

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Anonymous 

here is a workaround for you

create a closecount column

closecount = if(ISBLANK('Table'[closed_date]),0,if('Table'[closed_date]=MAXX(FILTER('Table','Table'[Incident_Number]=EARLIER('Table'[Incident_Number])),'Table'[closed_date]),1,0))

 

then create measures

Open count = DISTINCTCOUNT('Table'[Incident_Number])

Close count = 
CALCULATE(SUM('Table'[closecount]),USERELATIONSHIP('Calendar'[Date],'Table'[closed_date]))

opennet = [Open count]-[Close count]

 

However , I have a question.

1244306, last close in Nov

1250824 , last close in Dec

1050761, last close in Oct.

So should be 1 for Oct, Nov and Dec. How come your result is 2,0,1?

 

please see the attachment below

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
ryan_mayu
Super User
Super User

@Anonymous 

here is a workaround for you

create a closecount column

closecount = if(ISBLANK('Table'[closed_date]),0,if('Table'[closed_date]=MAXX(FILTER('Table','Table'[Incident_Number]=EARLIER('Table'[Incident_Number])),'Table'[closed_date]),1,0))

 

then create measures

Open count = DISTINCTCOUNT('Table'[Incident_Number])

Close count = 
CALCULATE(SUM('Table'[closecount]),USERELATIONSHIP('Calendar'[Date],'Table'[closed_date]))

opennet = [Open count]-[Close count]

 

However , I have a question.

1244306, last close in Nov

1250824 , last close in Dec

1050761, last close in Oct.

So should be 1 for Oct, Nov and Dec. How come your result is 2,0,1?

 

please see the attachment below

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hi @ryan_mayu  is there any way to create below column in Measure..? 

Closecount = if(ISBLANK('Table'[closed_date]),0,if('Table'[closed_date]=MAXX(FILTER('Table','Table'[Incident_Number]=EARLIER('Table'[Incident_Number])),'Table'[closed_date]),1,0))

 

Anonymous
Not applicable

@ryan_mayu  Thanks for spending your time on this task.

Yes you're right it should be 1 for Oct. I made mistake on output calculation.

Once agian thank you very much @ryan_mayu .. It's very useful to me. 

Anonymous
Not applicable

For the above post here is the conditions to be maintained. Can some one help me to achive.

Open Count: For a given month, total distinct count that had at least 1 CA that was open as on EOM

Close Count: For a given month, total distinct count for which the last CA was closed in that month

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.