cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jo_at_price
Advocate I
Advocate I

Make a Chart with Order Status based on Create Date and Close Date, group by month

I have a simple Orders table and I need to create a chart based on Order Status by month. All I have is a [create date] and [Closed date], I came up with a solution, but it's too cumbersome and I have to add a couple of new rows to a Historic table a the beginning of each month. Is there a better way? Here's a snapshot of the first 14 rows:

jo_at_price_0-1631652624965.png

 

So I created some columns to get the number of orders open / closed June, July August, Sep:

jo_at_price_1-1631652685965.png

I crreated a "Historic" table:

Historic = UNION(
SUMMARIZE('Orders', "New Status","Open", "hDate", date(2021,6,1), "hCount", SUM('Orders'[1. Open In June]))
, SUMMARIZE('Orders', "New Status","Open", "hDate", date(2021,7,1), "hCount", SUM('Orders'[2. Open In July]))
, SUMMARIZE('Orders', "New Status","Open", "hDate", date(2021,8,1), "hCount", SUM('Orders'[3. Open In August]))
, SUMMARIZE('Orders', "New Status","Open", "hDate", date(2021,9,1), "hCount", SUM('Orders'[4. Open In September]))

, SUMMARIZE('Orders', "New Status","Closed", "hDate", date(2021,6,1), "hCount", SUM('Orders'[5. Closed In June]))
, SUMMARIZE('Orders', "New Status","Closed", "hDate", date(2021,7,1), "hCount", SUM('Orders'[6. Closed In July]))
, SUMMARIZE('Orders', "New Status","Closed", "hDate", date(2021,8,1), "hCount", SUM('Orders'[7. Closed In August]))
, SUMMARIZE('Orders', "New Status","Closed", "hDate", date(2021,9,1), "hCount", SUM('Orders'[8. Closed In September]))
)
And the Chart works as expected:
jo_at_price_2-1631652758146.png

 

 But is there a way to have that same Chart without a "Historic" table?
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jo_at_price , Can it be solved using Open and close dates like HR?

Check if this blog can help

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

I think you need a measure like current employee

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@jo_at_price , Can it be solved using Open and close dates like HR?

Check if this blog can help

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

I think you need a measure like current employee

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Dev Camp Session 22 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!