Forum Discussion
running total
- 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.
no, I haven't considered that yet(dateadd), don't I need 2 measures to graph 2 separate lines? How else would I compare last year to this year?
Thanks
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.
- wsloan31110 years agoRegular Visitor
Thanks for the help, think I'm getting close, I used these formulas and set everything up like you said, only problem is I don't understand how you get both lines for the different year. I put the EncounterCountYTD in the value box and I just get this year, not this year and last year.
- greggyb10 years agoResident Rockstar
wsloan311 Note how I've put DimDate[Year] as the legend entry. The labels from the field in the legend entry will all be plotted as separate lines.
**Edit** I notice that the images come across scaled down quite a bit in the in-browser viewer they've got on this forum. You can download a copy to get the original full res image that's easier to see what I'm doing.
- wsloan31110 years agoRegular Visitor
Thanks alot greggyb, that worked perfectly. I appreciate you taking the time.