Author Topic: Any competent DAX/PPVT users here  (Read 194 times)

ElyDave

  • Royal and Ancient Polar Bear Society member 263583
Any competent DAX/PPVT users here
« on: December 31, 2020, 10:14:49 am »
I've been trying to get to grips with this for a while as I think it will be a great help with some of the reports and data I deal with. This time I think I finally started from the right place, rather than just throwing data at PowerBI/Power Pivot and getting frustrated.  I have a textbook which is working fairly well, but I've come up against a problem that I can't work out.

I'm playing with my own exercise data to try and use the expressions I've learned, and the one in particular that is frustrating me is TOTALYTD,

I've created a dates table from 1/Jan/2020 through to end 2024, and used the expression below.  I've made the table that long as I want the YTD to automatically update each year with a slicer.

=TOTALYTD([Distance Cycling],DATESYTD(Calendar[Date])). 

If I select Pivot by months, this is now giving me values, but each month value is equal to the sum of that month only, whereas what I'm trying to do is Month 2 YTD = Month 2 + Month 1 etc. The sums per month are correct based on my original spreadsheet using SUMIFS, effectively I've spent the last 5 days trying to lean how to do those SUMIFS more flexibly through Power Pivot.

Any idea why this might not be working as I anticipated?
“Procrastination is the thief of time, collar him.” –Charles Dickens