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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jo_at_price
Advocate II
Advocate II

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

 

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

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.