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

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

Reply
Coldsmokeski
Frequent Visitor

Line graph to show counts of records, by month, based on the record's start and end date

Bounced around trying to find a solution and thought I found one using the 'open tickets' solution HERE.  Unfortunately the resulting visual is not bucketing the records by date appropriately.  Hoping for some assistance in finding a solution.

 

I'm trying to build a visual which shows the count of 'PositionID', by 'OrgGrp', which exists within in a month, utilzing the range between the 'JobStart' and 'JobEnd' to determine whether it should be counted. 

 

Here's a sample of the dataset:

 

PositionIDOrgGrpOrgJobJobStartJobEnd
C1-C11-001C1C11CL110/1/20199/30/2021
C1-C15-002C1C15CL210/1/20199/30/2021
C2-C21-003C2C21CL310/1/20199/30/2021
C2-C22-004C2C22CL11/15/20209/30/2021
C2-C23-005C2C23CL21/15/20209/30/2023
C2-C24-006C2C24CL34/15/20219/30/2023
C3-C30-007C3C30CL14/15/20219/30/2023
C3-C31-008C3C31CL24/15/20219/30/2023
C3-C31-009C3C31CL34/15/20219/30/2023
C3-C33-010C3C33CL14/15/20219/30/2022
C3-C36-011C3C36CL24/15/20219/30/2022
C4-C41-012C4C41CL310/1/20199/30/2022
C4-C42-013C4C42CL110/1/201910/15/2024
C4-C44-014C4C44CL210/1/201910/15/2024
C4-C44-015C4C44CL310/1/201910/15/2024
C4-C44-016C4C44CL110/1/202210/15/2024
C5-C45-017C5C45CL210/1/202210/15/2024
C5-C45-018C5C45CL310/1/202210/15/2024

 

Thanks in advance for any assistance!
 

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you for the reply.  However it doesn't quite get me to a solution. 
In the example you provided there is only one date defined, 'Date', for each record in the data table.  The solution I'm after would derive the count for a user defined period by evaluating the 'job start' and 'job end' dates and count that record if it is active during the defined period.
I'm thinking I may have to build a table to break out the records by date based on their start/end dates.  Thoughts?

Any further assistance is very much appreciated.

You are welcome.  I have transformed your data to ensure that only a single date column remains.  Please study the transformation steps in the Query Editor to gain better understanding of what i have done.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors