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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
rdorsey
Frequent Visitor

Need help combining two date fields

I have a data set which has fields for "process name", "date started", and "date completed". I would like to create a clustered column chart with time on the X axis and for the Y axis a column showing how many processes were started and a column showing how many processes were ended. I can do this in two separate visualizations no problem, but my boss wants them in a single plot and I'm really at a loss for how to get that to work. Any advice would be greatly appreciated!

1 ACCEPTED SOLUTION
fhill
Resident Rockstar
Resident Rockstar

OK, probably lots of ways to do this, but here's one idea...  

 

1. Create a new Calendar Date Table based on the MIN Start Date and MAX Complete Date:

zDate Table = CALENDAR(MIN('zData Table'[Date Started]), MAX('zData Table'[Date Complete]))

 

** Don't join it to your original table, i'll explain why later. **

 

Create these custom columns on your NEW Date table...

Count of Start Dates = CALCULATE( COUNTA( 'zData Table'[Date Started]), FILTER('zData Table', 'zData Table'[Date Started] = 'zDate Table'[Date]))
Count of Comp Dates = CALCULATE( COUNTA( 'zData Table'[Date Complete]), FILTER('zData Table', 'zData Table'[Date Complete] = 'zDate Table'[Date]))
 
Now create your chart based on the Date Table and your 2 new columns....

fhill_0-1626379506855.png

 
If you create a Join between the two tables, you would have to choose a primary connection between either Date Started or Date Completed, and that would throw off all your numbers.
 
Hope this helps...
Forrest



Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




View solution in original post

3 REPLIES 3
fhill
Resident Rockstar
Resident Rockstar

OK, probably lots of ways to do this, but here's one idea...  

 

1. Create a new Calendar Date Table based on the MIN Start Date and MAX Complete Date:

zDate Table = CALENDAR(MIN('zData Table'[Date Started]), MAX('zData Table'[Date Complete]))

 

** Don't join it to your original table, i'll explain why later. **

 

Create these custom columns on your NEW Date table...

Count of Start Dates = CALCULATE( COUNTA( 'zData Table'[Date Started]), FILTER('zData Table', 'zData Table'[Date Started] = 'zDate Table'[Date]))
Count of Comp Dates = CALCULATE( COUNTA( 'zData Table'[Date Complete]), FILTER('zData Table', 'zData Table'[Date Complete] = 'zDate Table'[Date]))
 
Now create your chart based on the Date Table and your 2 new columns....

fhill_0-1626379506855.png

 
If you create a Join between the two tables, you would have to choose a primary connection between either Date Started or Date Completed, and that would throw off all your numbers.
 
Hope this helps...
Forrest



Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




rdorsey
Frequent Visitor

This worked perfectly, thank you!

Greg_Deckler
Community Champion
Community Champion

@rdorsey If I am not mistaken, you are going for this:


Take a look at these two Quick Measures as I think you want something like them.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364
https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.