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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
BI_Analyticz
Helper V
Helper V

Sales Order Summary - Created, Closed (Current + Old), Closed ( Current ) etc.,

Hi Team,

 

I have a data like below.

 

Order ID, Created Date, Closed Date

 

I was able to create a rolling view on Created, Closed and Backlogs using a calendar table...

  1. Orders Created Every Month
  2. Orders Closed Every Month (Includes Old Orders too)
  3. Pending Order at End of Month (Open Orders)

BI_Analyticz_0-1657650303181.png

 

Now I want to include two more columns like below which I have no clue or stuck clearly. (colored in red)

  1. Orders Created Every Month
  2. Orders Closed Every Month (Created Month/Year = Closed Month/Year)
  3. Orders Closed Every Month (Includes Old Orders too)
  4. Pending Order at End of Month (Open Orders but Created Date is current Month)
  5. Pending Order at End of Month (Open Orders)

Note: I want this as a Date Hierarchy Matrix table as shown in previous screenshot.

Please help ! Is this possible?

3 REPLIES 3
v-jayw-msft
Community Support
Community Support

Hi @BI_Analyticz ,

 

Have trouble to follow.

I can't combine your screenshot above with the needs you describe, so I can only show the approximate formula.

--Orders Closed Every Month (Created Month/Year = Closed Month/Year)

 

closed every month =
CALCULATE (
    COUNT ( 'table'[orderid] ),
    FILTER (
        'table',
        'table'[created_date].YEAR = 'table'[closed_date].YEAR
            && 'table'[created_date].QUARTER = 'table'[closed_date].QUARTER
            && 'table'[created_date].MONTH = 'table'[closed_date].MONTH
    )
)

--Pending Order at End of Month (Open Orders but Created Date is current Month)

pending order at end of month =
CALCULATE (
    COUNT ( 'table'[orderid] ),
    FILTER (
        ALLSELECTED ( 'table' ),
        'table'[created_date].YEAR = SELECTEDVALUE ( 'date'[date].YEAR )
            && 'table'[created_date].QUARTER = SELECTEDVALUE ( 'date'[date].QUARTER )
            && 'table'[created_date].MONTH = SELECTEDVALUE ( 'date'[date].MONTH )
            && 'table'[closed_date].YEAR <> SELECTEDVALUE ( 'date'[date].YEAR )
            && 'table'[closed_date].QUARTER <> SELECTEDVALUE ( 'date'[date].QUARTER )
            && 'table'[closed_date].MONTH <> SELECTEDVALUE ( 'date'[date].MONTH )
    )
)

 

Best Regards,

Jay

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

@v-jayw-msft Do I have to use a separate calendar table? What kind of relationship to be used. Is it only one between CreatedDate and Calendar Date?

BI_Analyticz
Helper V
Helper V

Guys any suggesstions please

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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