Forum Discussion

Gabe_07's avatar
Gabe_07
Helper I
6 years ago
Solved

Static QUARTERS calculation

Hello,         I've been stuck in this task for a day. I trying to display the "total sales" for a quarter when you select a month. Ex: If you select May, it will display the total sales for April, ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Gabe_07 .

     

    If what you are showing is the actual data and you have year and period/month, why don't you just create a separate table for Month/Quarter...  I added in Semi Annual though it is rarely used in Finance.

     

     

    MonthQuarterSemi Annual
    JanuaryQ01Semi01

    February

    Q01Semi01
    MarchQ01Semi01
    AprilQ02Semi01
    MayQ02Semi01
    JuneQ02Semi01
    JulyQ03Semi02
    AugustQ03Semi02
    SeptemberQ03Semi02
    OctoberQ04Semi02
    NovemberQ04Semi02
    December Semi02

     

    Create a Relationship/Join between this table and your main datasource table...  The caveat is that you should have something for unassigned if there are null values in your datasource table.

     

    Hope that helps.

    Lou

  • Anonymous's avatar
    Anonymous
    6 years ago

    Gabe_07 
    Try create the following measure: 

     

    Measure = CALCULATE(SUM('Table'[Sales]),FILTER(ALL('Table'),QUARTER([Date])=SELECTEDVALUE('Table'[Date].[QuarterNo])))

     

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