Forum Discussion

bharathiscripps's avatar
bharathiscripps
Frequent Visitor
4 years ago

Help with Cumulative Sum DAX measure

Hi,

 

Could someone help me understand why I have deafult values showing up in cumulative sum of calculated week?

The cumulative sum is correct for the week numbers (lead weeks) which has some value for the rest i get the final default value.

I want to show only the weeks which has some value not all weeks from the calculated column. Is that possible?

 

 

Thank you,

Bharathi

 

3 Replies

  • bharathiscripps ,
    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

     

    Usually, a measure like this should work

    Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected('Date'),'Date'[date] <=max('Date'[date])))

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Icon for Community Support rankCommunity Support

    Hi, bharathiscripps ;

    You could try it.

    Cum PacingRev Lead =
    IF (
        [Pacing Gross] <> BLANK (),
        CALCULATE (
            [Pacing Gross],
            FILTER (
                ALLSELECTED ( 'SCRIPPS_PACING' ),
                [Lead Weeks] <= MAX ( [Lead Weeks] )
            )
        )
    )
    

    If it doesn't fit your model, can you share a simple file with sensitive information removed?

    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Icon for Community Support rankCommunity Support

    Hi, bharathiscripps;

     

    Is your problem solved? If so, Would you mind accept the helpful replies as solutions? Then we could close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

    Best Regards,
    Community Support Team_ Yalan WuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.