Forum Discussion

norken20's avatar
norken20
Icon for Helper I rankHelper I
6 years ago
Solved

Calculate Quarter Sales

Hi All,

 

I'm tryin?g to calculate the sum per quarter of a sales revenue but I can't figure out the best way to compute it. May I know of the best way how?

 

I have 2 columns table forexample below and want to get the total per quarter.

 

Revenue         Quarter

100                    Q1

200                    Q1

300                    Q1

330                    Q2

400                    Q2

600                    Q2

600                    Q3

300                    Q3

200                    Q4

100                    Q4

 

Thanks!

  • Anonymous's avatar
    Anonymous
    6 years ago

    HI norken20,

    Any other categories or fields are you used in calculation? If this is a case, please explain more detail about your data structure.

    How to Get Your Question Answered Quickly 
    If not, you can simply use 'quarter' field right part as filter conditions to calculate.

    Measure =
    CALCULATE (
        SUM ( Table[Revenue] ),
        FILTER (
            ALLSELECTED ( Table ),
            RIGHT ( Table[Quarter], 1 ) <= RIGHT ( MAX ( Table[Quarter] ), 1 )
        )
    )
    

    Regards,

    Xiaoxin Sheng

4 Replies