Forum Discussion

2 Replies

  • PiEye's avatar
    PiEye
    Resolver II

    Hi, I wasn't able to open the file by zipping it, but I was able to recreate the scenario with different data.

     

    You would be best off using a "window" function (see guidance here from SQL BI) 

     

    If I have a function called "min price" and a table ordered by Date, the cumulative min price would look like:

    Cumu min price = 
    SumX (
        WINDOW (
            0, ABS,
             0, REL,
            ORDERBY ('Sales'[DateKey], ASC )
        ),
        [min price]
    )
     
    HTH - if not, see if you can re-attach the pbix and I can try it in your data
     
    Pi Eye