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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
RobRayborn
Helper III
Helper III

Summarize previous past due orders

I need to rollup or summarize the previous Sales Orders that are still Open as of Today's Date.

In columns I have Month/Year for which I have just Jan - Dec 2022.  In the rows I have different catagories.

I have measure, Total Orders = SUMX([Orders Entered, Orders Entered [Orders])

 

I need to summarize or rollup to the current date all the previous [Orders] where the Order Status = "Open"  and Date = Dates, [IsAfterToday] = FALSE ().  This needs to inclued all previous dates so even though my columns are filtering 2022 by month I need it summarized or rolledup for any previous date including previous years.

The Summary or Rollup will reside in the current month.  So for March 2022 all the "Past Due" order will be in March 2022, and Jan 2022 and Feb 2022 will be BLANK.

Hopefully I've explained my issue well enough. 

1 REPLY 1
Whitewater100
Solution Sage
Solution Sage

Hi:

Seeing your model or example data will help, with that said you should be ale to use something like this with your own table names and column names: It's critical you have a date table and separate facttable with your orders(I'm calling this "Orders". Also Data Table must be marked as Date Table., named "Dates" in the measure below. Dates[Date] is the column in the date table that has the regular date in it like 3/18/2022.

 

OpenOrders =
CALCULATE (
VAR DateStart = MIN ( 'Dates'[Date] )
VAR DateEnd = MAX ( 'Dates'[Date] )
RETURN
CALCULATE (
COUNTROWS ( Orders ),
Orders[OrderDate] <= DateStart,
Orders[DeliveryDate] > DateEnd,
ALL ( 'Date' )
),
LASTDATE ( 'Date'[Date] )
)

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors