Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Cumlative count is displaying great for this year. But how do I go about showing the previous year? You can see in the screenshot above I'm looking to compare 2 years, cumulatively. (This YTD, and last year entirely)
Solved! Go to Solution.
This is your code:
Cum2 = TOTALYTD(CALCULATE(COUNT(IncidentInjury[id]));IncidentInjury[created_at];ALL(IncidentInjury))
Cum3 = TOTALYTD(CALCULATE(COUNT(IncidentInjury[id]));SAMEPERIODLASTYEAR(IncidentInjury[created_at]);ALL(IncidentInjury))
as seen here:
Please mark as solution if so, thumbs up for the effort would be great.
Kind regards, Steve.
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
This is your code:
Cum2 = TOTALYTD(CALCULATE(COUNT(IncidentInjury[id]));IncidentInjury[created_at];ALL(IncidentInjury))
Cum3 = TOTALYTD(CALCULATE(COUNT(IncidentInjury[id]));SAMEPERIODLASTYEAR(IncidentInjury[created_at]);ALL(IncidentInjury))
as seen here:
Please mark as solution if so, thumbs up for the effort would be great.
Kind regards, Steve.
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
Thanks Steve!
What's the filter/syntax to cut the data off at the MAX date? (For example, I want the line to stop at June)
Welcome!
Are you using a date dimension?
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
Yes, using a Date Dimension table. Although PBI might be trying to use the internal as well.
Andy
SAMEPERIODLASTYEAR() gives you the entire previous year's date range. That is somewhat unexpected, but it perfectly fits what you want (however questionable the reasoning behind that is).
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |