Forum Discussion

leroy773's avatar
leroy773
Helper II
9 years ago
Solved

Calculate running total

All,

 

I am attempting calculate a running total.  I am able to calculate the running total, but graphing the data is not showing the results I would like to see.  Which formula should I use to show running total?  Thanks

 

If I use TOTALYTD, is does not include prior year data and current year data.

Install Base = TOtalYTD(COUNTROWS('BI Sequel Installed Instruments'),DateDimension[DateKey])

 

 

If i use calculate function it shows the total number for each qtr instead of incremental growth.

Install Base = CALCULATE(COUNTROWS('BI Sequel Installed Instruments'),DateDimension[DateKey])

 

 

 

2 Replies

  • Hi leroy773

     

    pls try something like this:

     

    Install Base YTD = 
    VAR vYear = YEAR(MAX(DateDimension[DateKey]))
    VAR CurrDateKey = MAX(DateDimension[DateKey]
    RETURN
    CALCULATE(
      COUNTROWS('BI Sequel Installed Instruments'),
      ALL(DateDimension),
      DateDimension[Year] = vYear,
      DateDimension[DateKey] <= CurrDateKey
    )

    HTH,

    Frank