Forum Discussion
jurkowskij
3 years agoFrequent Visitor
Problem with 12 months Trend Calculating (Date Hierarchy)
I'm trying to figure out a way to use 12 month trend with date hierarchy Formula I use Trend 12 M =
CALCULATE(
[Qty]
,DATESINPERIOD(Sales[OrderDate],max(Sales[OrderDate]),-12,MONTH)
...
- 3 years ago
Your data model needs some changes. The Calendar table is a dimension table and needs to have a 1:*, single direction relationship to your fact (Sales) table.
Next step is to use the date from the dimension, not from the fact. Then your calculations will work.
see attached
lbendlin
Super User
3 years agoYour data model needs some changes. The Calendar table is a dimension table and needs to have a 1:*, single direction relationship to your fact (Sales) table.
Next step is to use the date from the dimension, not from the fact. Then your calculations will work.
see attached
jurkowskij
3 years agoFrequent Visitor
Ohhh now I understand.
Thanks a lot