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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
DataUsurper
Helper II
Helper II

Modify Calculated Table for Earliest Start Week

I have the following function to create a table where each record lists the week-start date along with the correlating product code and orderid where a "1" is placed when an order falls within that record's week-start date (which is between the order's Ship and Return dates).

wtbl_WROR = 
VAR a =
    CALENDAR(MINX('1','1'[SHIP_DATE]),MAXX('1','1'[cRETURNDATE]))
VAR b =
    SELECTCOLUMNS (
        tbl_OrderData1,
        "sORDERID.DAX",tbl_OrderData1[s_OrderID_DAX],
        "eCODE",tbl_OrderData1[eCODE]
    )
RETURN
    FILTER ( CROSSJOIN ( a, b ), WEEKDAY ( [Date], 2 ) = 1 )

Which produces this table:

PB1.png

 

However, I have ship start dates that are 9/1 which aren't getting produced on this list where I would expect the lowest date record reflecting 8/28/17. What am I missing in the MINX field to accomplish this?

 

Thank you
DU

1 REPLY 1
v-yuta-msft
Community Support
Community Support

@DataUsurper ,

 


However, I have ship start dates that are 9/1 which aren't getting produced on this list where I would expect the lowest date record reflecting 8/28/17. What am I missing in the MINX field to accomplish this?


I'm confused on your requirement, could you please clarify more details about your requirement and give the expected output?

Regards,

Jimmy Tao

 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.