Forum Discussion
Need help with YTD moving average
- 1 year ago
Hello, Woodyy ,
as long as you have Date type in one of the columns in your calendar (with relationship to your fact table) and you use that calendar inside the expressions, it's going to work just fine.Please test and mark the right answer as a solution, possibly some kudos would be also appreciated. Thank you
Dear vojtechsima , thank you for the reply!
How do I compute the moving average in this case ?
avg = AVERAGE('Table'[value])avgRunning = TOTALYTD([avg], 'calendar'[Date])
given you have the calendar
- Woodyy1 year agoRegular Visitor
Thank you so much vojtechsima, it is very clear!
I have a column with the date ( in the date format) with years and months. Does it work anyway or do i need to create another column in that specific way? And, in case , how can I convert my date column in the right format?thank you again!
- vojtechsima1 year ago
Super User
Hello, Woodyy ,
as long as you have Date type in one of the columns in your calendar (with relationship to your fact table) and you use that calendar inside the expressions, it's going to work just fine.Please test and mark the right answer as a solution, possibly some kudos would be also appreciated. Thank you
- Woodyy1 year agoRegular Visitor
Dear vojtechsima , thank you again!
i have tried your solution but unfortunately it does not work because I forgot to mention that I would compute the average of a measure( this measure simply computes the rate between two values) and the AVERAGE function does not recognizes the measures.
How can i fix it?thank you so much!!
- Woodyy1 year agoRegular Visitor
Thank you so much vojtechsima , it is very clear now!
i have a date column ( in the date format) with years and months. Does it work anyway or do I need to change it to the right format? And if yes, how can I do it?
thank you again!