Forum Discussion

Suhel_Ansari's avatar
Suhel_Ansari
Helper V
1 year ago
Solved

3 months Total DAX Measure

Hi All, I need a Measure to calcualte the 3 Months total as shonw in follwoing screen print. please assit. Thanks Ex : - Jan,Fab & Mar total shown be the 3 Months accross Jan,Feb & Mar (1598+1735+1...
  • Bibiano_Geraldo's avatar
    1 year ago

    Hi Suhel_Ansari ,

    Please use this DAX to achieve your goal:

    QuarterlyTotal = 
    VAR CurrentQuarter = QUARTER(MAX('Table'[Edate]))
    VAR CurrentYear = YEAR(MAX('Table'[Edate]))
    RETURN
    CALCULATE(
        SUM('Table'[Saless]),
        FILTER(
            ALL('Table'),
            YEAR('Table'[Edate]) = CurrentYear &&
            QUARTER('Table'[Edate]) = CurrentQuarter
        )
    )

     

    Your final result will look like this: