Forum Discussion

CEllinger's avatar
CEllinger
Helper I
6 years ago
Solved

Redistributing a calculation across date range

I am attempting to quantify the redistribution of a backlog of sales orders (cause of some virus or something  😓) If anyone can help me I would be super appreciative.   I have a normal Date Table ...
  • v-juanli-msft's avatar
    v-juanli-msft
    6 years ago

    Hi CEllinger 

    Add three measures

    Measure = SUMX(ALLEXCEPT('date','date'[year]),[selected value])
    
    Measure 2 =
    CALCULATE (
        DISTINCTCOUNT ( 'date'[year monthno] ),
        FILTER (
            ALLSELECTED ( 'date' ),
            'date'[year]
                = MAX ( 'date'[year] )
                && 'date'[Date]
                    > EOMONTH (
                        MAX ( 'disconnect date'[Date] ),
                        0
                    )
        )
    )
    
    
    Measure 3 = [Measure]/[Measure 2]
    
    Measure 4 =
    IF (
        MAX ( 'date'[Date] )
            > EOMONTH (
                MAX ( 'disconnect date'[Date] ),
                0
            ),
        [rest  of the year] + [Measure 3]
    )
    

     

    Best Regards
    Maggie
    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.