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

Numer of open reports per month based on Created Date and Closed Date

Hi all

 

I have a Sharepoint List which is used for registering and hanling NCRs (Non-Conformity Reports).

I would like to track the number of open NCRs per month historically based on [Created Date] and [Closed Date] on the individual NCRs.

 

Also I would like suggestions as to how to handle Open NCRs ([Closed Date]=null

 

Thanks in advance!

 

/Jens

1 ACCEPTED SOLUTION

Hi @Anonymous ,

According to your description, I create a sample, there are two tables.

vkalyjmsft_0-1648620548493.png

vkalyjmsft_1-1648620584747.png

Here's my solution. 

Create a measure.

# of open NCR =
VAR _Day =
    EOMONTH ( MAX ( 'Month'[Month] ), 0 )
RETURN
    COUNTROWS (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Created] <= _Day
                && 'Table'[NCRFinalDate] > _Day
        )
    )

Get the correct result.

vkalyjmsft_2-1648620694453.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Tahreem24
Super User
Super User

@Anonymous  Could you share the sample dummy data?

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

NCR_NumberCreatedNCRFinalDate
30127-09-2017 15:0823-04-2018
30227-09-2017 15:5525-11-2019
30328-09-2017 09:5302-02-2018
30428-09-2017 10:0402-02-2018
30502-10-2017 09:3415-11-2017
30602-10-2017 09:4415-11-2017
30704-10-2017 14:0430-11-2017
30805-10-2017 12:2710-10-2017
   

@Anonymous ,First create a Date only column from Created column.

Created Date Column =FORMAT(NCRTable[Created],"DD/MM/YYYY")

Then, create a measure like below:

Open NCR = CALCULATE(COUNTROWS(NCRTable),ALLEXCEPT(NCRTable,NCRTable[Created Date Column]))

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

Maybe I didn't pose my issue clearly enough ....

 

What I would like is to see the number of open NCRs month by month, historically, based on the created and NCRFinalDate. So with the dummy data above you'd get the data in the # of open NCR column below

Month# of open NCRComment
sep-173(number 301, 302, 303 and 304 all created sep-17, but not closed by sep-17)
oct-177(the ones above + 305, 306 and 307 all of which were created in or before oct-17, but not closed by the end of oct-17. 308 is not counted because it was closed oct-17) 
nov-174(305, 306 and 307 closed during nov-17)
dec-174(no change)
jan-184(no change)
feb-182(303 and 304 closed)
mar-182(no change)
apr-181(301 closed)
maj-181(no change)

so something like

OpenNCRsep-17 = IF NCR[created]<=sep-17 AND NCR[NCRFinalDate]>=sep-17 

it should count as being open in sep-17, and so an and so forth giving me the number of open NCR per month since sep-17 until last month end

Hi @Anonymous ,

According to your description, I create a sample, there are two tables.

vkalyjmsft_0-1648620548493.png

vkalyjmsft_1-1648620584747.png

Here's my solution. 

Create a measure.

# of open NCR =
VAR _Day =
    EOMONTH ( MAX ( 'Month'[Month] ), 0 )
RETURN
    COUNTROWS (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Created] <= _Day
                && 'Table'[NCRFinalDate] > _Day
        )
    )

Get the correct result.

vkalyjmsft_2-1648620694453.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks! Worked a charm!

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