Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Cumulative Sales month wise

Hi Guys

here i am facing issue related to Cumulative total values.

this is my cumulative Monthly sales measure 

Cumulative Query for monthly

Here, I created Normal matrix and Cumulative matrix.

Normal Matrix & Cumulative Matrix

2nd matrix showing sales values are wrong, i mean cumulative matrix may - 20 it's showing zero(0.0M) bcz of orginal matrix have 0 values in may 20.

But i need value in may 20 ->(2366.9M+0.0M) = 2366.9M Cumulative matrix.

 

Cumulative total will showing perfect fine may-20 (2366.9+379.6+4450.1+4545.0+0.0 = 11,741.5), but when coming to month wise it's not showing.

 

regards,

naveen

  • Hi Anonymous ,

    You can create a measure like this:

    Measure =
    SUMX (
        SUMMARIZE (
            FILTER (
                ALLSELECTED ( 'DIM_TIME' ),
                'DIM_TIME'[Date] <= MIN ( 'DIM_TIME'[Date] )
                    && 'DIM_TIME'[Product] IN DISTINCT ( 'DIM_TIME'[Product] )
            ),
            'DIM_TIME'[Month_Year],
            "MeasureValue", CALCULATE ( [Actual Net flow] )
        ),
        [MeasureValue]
    )

    The result may be your expected:

     

    Here is my sample file that hopes to help you too, please check and try it: Cumulative Sales month wise.pbix 

     

    Best Regards,
    Yingjie Li

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

     

2 Replies