Forum Discussion

isam2003's avatar
isam2003
Icon for Helper I rankHelper I
3 years ago

New Measure for Running Total from Measure Output

Hello:

 

I have a DAX measure that results in the maximum of available quarterly sums in each fiscal (or calendar as per user choice) year.

    VAR __Type = MAX('Year_Type'[Year_Type])
    VAR __Year = MAX('Years'[Year])
    VAR __Result =
        IF(
            __Type = "Fiscal",
           
            MAXX(FILTER('Data_Q', [FYear] = __Year),[Value]),
            MAXX(FILTER('Data_Q', [CYear] = __Year),[Value])
        )
RETURN  
    __Result

I would like to add another measure that determines the MAX value over available quarters in a year (fiscal or calendar) for each country and returns the SUM.  For eg. the result would be 45 for the following table. 
CountryQ1 FY23Q2 FY23Greater?
A181718
B444
C1 1
D888
E121414
   45

I tried a number of running total solutions available on this forum but could not work my way out . Any guidance would be much appreciated.

Thanks in advance.