Forum Discussion

wsloan311's avatar
wsloan311
Regular Visitor
10 years ago
Solved

running total

I'm trying to create a line report that compares cumulative totals by month as the x-axis.  I've created formulas to calculate 2015 and 2016 totals.  Problem is it only shows the total if I use the a...
  • greggyb's avatar
    greggyb
    10 years ago

    First, fbrossard, wow you're totally right. I hadn't realized that effect in Power BI. I'll be honest that the majority of my time these days is spent in SSAS Tabular, and I utilize Power BI solely as a visualization layer. Thanks very much for clarifying these points for me.

     

    Second, toward the requirement of the OP, rereading it seems that you're making things far too complicated on yourself. Here's a suggestion of the measures to use:

     

    EncounterCount = 
    COUNTA( AssessmentLogEntries[EncounterKey] )
    
    EncounterCountYTD = 
    TOTALYTD( [EncounterCount], DimDate[Date] )

    Below are some images of my sample data and a chart behaving (I believe) exactly as you want.

     

    My chart, months on the X axis, with two years plotted as separate lines

    Sample of my date dimensionSample of my fact table - note 1 entry per month in 2014, 2 entries per month in 2015Relationships

     

    You can change from year to year by just updating the visual-level filter on year.