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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
kamswenson05
New Member

Calculate Min over select period of time

I am trying to calculate the minimum cycle time within duplicate columns over a select period of time. I want the minimum cycle found within the "Average Cycle" column with the same "Machine", "Part ID", "Mold ID". You can see below I got 44.99 for the first two rows but in my script I have it dating back to -5 months from the current date. I am looking to find lowest average cycle back to 4/1/2022, but have it as a 6 month dynamic change not a set date. Here is my code below:

Capture.PNG

DEFINE
    ---- MODEL MEASURES BEGIN ----
    MEASURE 'Calculations'[Min Cycle Test] =
        CALCULATE (
            MIN ( vRubbermaidShift_Eff_BOM[Average Cycle] ),
            ALLEXCEPT (
                vRubbermaidShift_Eff_BOM,
                vRubbermaidShift_Eff_BOM[Machine],
                vRubbermaidShift_Eff_BOM[Part ID],
                vRubbermaidShift_Eff_BOM[Mold ID]
            ),
            DATESINPERIOD (
                vRubbermaidShift_Eff_BOM[ShiftStart],
                MAX (vRubbermaidShift_Eff_BOM[ShiftStart]),
                -5,
                MONTH
            )
        )

1 REPLY 1
v-yinliw-msft
Community Support
Community Support

Hi @kamswenson05 ,

 

I'm a little confused about the results you want, can you describe in more detail what you want to achieve? Example screenshots are also available, please note that you delete private and important data.

 

Best Regards,

Community Support Team _Yinliw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.