Forum Discussion
Moving average excluding weekends and holidays
Anonymous
Ok but what I am asking about is the real table that you will use in your calculations.Let's forget about the example shown.
The "real" table has entries on weekends and holidays?
- AlexisOlson7 years ago
Super User
That's an interesting approach, but you have to be careful generalizing it. Indexing the workdays is a good idea, but I'd recommend doing the indexing on your dedicated date table rather than trying to deal with ranking duplicate dates in your fact table.
Another approach would be to use the TOPN function as I suggested here.
- AlB7 years ago
Community Champion
Anonymous
Ok so I got it all wrong from the beginning then.
But if it's so, what is the problem?? you just take the last five dates present in the table from the date in the current row. You do not have to skip anything then.
- Anonymous7 years agoNot applicable
I guess your right. How would I go about doing that within DAX? Is there an expression I'm missing here, or just a total mental block?
Thanks!