Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I've uploaded my pbix file here -> https://filebin.net/zn0vkabg326m5m57
I have the below formula which works to find a 2 day average:
Moving average 3 =
VAR
FilterContext_MaxDate = max('Product'[Date])
VAR
FilterContext_MinDate = FilterContext_MaxDate - 1
RETURN
calculate(average('Product'[Volume]),filter(All('Product'[Date]),
'Product'[Date] >= FilterContext_MinDate &&
'Product'[Date] <= FilterContext_MaxDate
))
But if I change the 4th line to this (by putting .Date at the end) then it breaks:
Solved! Go to Solution.
Hi @CloudMonkey ,
Please refer to this post: when to use Date.[date] ?
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @CloudMonkey,
Based on my test, it is caused by that the results returned are different.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sorry I must be missing some knowledge. Why would 'Product'[Date].[Date] provide a different date to 'Product'[Date]?
'Product'[Date] is stored as a date.
Thanks,
CM
Hi @CloudMonkey ,
Please refer to this post: when to use Date.[date] ?
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Product[Date] means the date field in the product table
what does Product[Date].[Date] mean ?
are you using an automatically generated date hierarchy ?
Help when you know. Ask when you don't!
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |