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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
joep78
Helper III
Helper III

Count open orders per month

Hi all,

 

I'm looking for a solution for the follwoing user story:

 

We want to count all open issues per each month whereby the ClosedDate is null or not in the same month. 

 

I formatted the table in an Excel example:

 

OrderAcceptedDateClosedDate
11-1-202015-1-2020
23-1-202018-1-2020
35-1-2020null
47-1-20202-2-2020
57-1-202031-1-2020
61-2-2020null
73-2-2020null
85-2-202018-2-2020
97-2-202020-2-2020
107-2-202018-3-2020
113-3-2020null
124-3-2020null
135-3-2020null
146-3-202015-3-2020
157-3-202020-3-2020
169-3-2020null
179-3-2020null
1810-3-2020null
1911-3-2020null
2020-3-2020null

 

the outcome should be as follow:

monthamount of new tickets amount of open tickets
152
254
31011

 

Let's take Month 1 as an example, there are 5 new tickets but 2 of them were still open at the end of January since the Closed date is either null or in the next month. same for february and march ofcourse. 

 

What options do I have to create this kind of outcome, I hope somebody has an idea and can help me out with this!

 

Thanks in advance for feedback!

 

Greetz Joep

1 ACCEPTED SOLUTION
3 REPLIES 3
v-jayw-msft
Community Support
Community Support

Hi @joep78 ,

 

Please check the following setps.

1# Create a CALENDAR table and a calculated column "Month".

 

CALENDAR = CALENDAR(MIN('Table'[AcceptedDate]),MAX('Table'[ClosedDate]))
month = MONTH('CALENDAR'[Date])

 

 2# Create measures as below.

 

amount of new tickets = CALCULATE(COUNT('Table'[Order]),FILTER(ALLSELECTED('Table'),'Table'[AcceptedDate].[MonthNo]=SELECTEDVALUE('CALENDAR'[month])))
amount of open tickets = CALCULATE(COUNT('Table'[Order]),FILTER(ALLSELECTED('Table'),'Table'[AcceptedDate].[MonthNo]<=SELECTEDVALUE('CALENDAR'[month])&&('Table'[ClosedDate]=BLANK()||'Table'[ClosedDate].[MonthNo]>SELECTEDVALUE('CALENDAR'[month]))))

 

3# Result would be shown as below.

1.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
joep78
Helper III
Helper III

Hi amitchandak ,

 

Thanks for your quick reply, I will dive into your blog and your example file but after a quick scan, this solution fits my user story. I will let you now via the SOLUTION as soon as I'm ready!

 

 

amitchandak
Super User
Super User

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.