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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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
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!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.