Forum Discussion
TOTALYTD not working as expected
- 9 years ago
I solved it
I created a Date Table using http://www.mattmasson.com/2014/02/creating-a-date-dimension-with-a-power-query-script/
Set the relationship with the date entry on my original table and then used the Date Table in DAX as
TOTALYTD(SUM(PowerBI_VenditePerGgCittaFamTipocli[Importo]); DateTableM[Date]; all(DateTableM[Date]))
I honestly do not know why it worked, I guess DAX needs to have a complete date/time reference to make calculations?
Anyway, good to know. That Power query script sure looks useful
Hi Baskar!
That was the first thing I tried but it did not work.
I guess TOTALYTD works only if you have the full set of dates in the given time. My date column was not as such. By appending a full date Table I was able to fill that gap. Or at least so I reckon.
Anyway it is working pretty fine now. Thanks for your help!
great dude. Lets rockzzz. cheers