Forum Discussion
minhas
2 years agoRegular Visitor
Time Intelligence Function (Latest Month Sales Calculation)
Hi there, I am working with a dataset, which has sales data starting from January 2022 to March 2024. I was trying to calculate latest month sales, i.e. March 2024. I want to make it dynamic so that...
lbendlin
2 years agoSuper User
yes, in this case you need to use the latest [Date of Purchase] from the fact table. But you need to define that as a variable outside of CALCULATE.
minhas
2 years agoRegular Visitor
Hi Ibendlin, thanks for your reply.
It actually works when I use latest [Date of Purchase] from fact table but doesn't work when using dimension table, i.e. Calendar table. And it seems like there is an issue with Calendar table. I tried several things to debug, such as importing fresh calendar table in different formats, creating new calendar table using Dax it doesn't work.
I more thing I have noticed, whenever I create or import new calendar table, it's hierarchy disappears as soon as I mark it as date table or after data modeling and connecting to fact table. Any idea what's going on?