Forum Discussion
Adidas
Helper I
7 years agoSameperiodlastyear funcion issue
Hello folks, I'm struggling with this one and couldn't find my way out My goal is to show a Bar chart with current year months on X-axis, and monthly Sales of current/last year on values. for that...
Anonymous
7 years agoNot applicable
Why would you have cross-filter enabled on the relationship? What's the use of it? You should switch to one-way filtering from dim to the fact table and then see what happens.
Adidas
Helper I
7 years agoHi
I've built a demo model to isolate the problem,
it's one to one relationship so I'm forced to set both ways join
however, it has nothing to do with my issue since in the original model it's one-way join and still the same wrong calculation.
I'm starting to believe that Sameperiodlastyear function is context related and was design to work like this
- Anonymous7 years agoNot applicable
Hi there.
Here's the documentation of the function: https://dax.guide/sameperiodlastyear/ as I don't know how I could be of any more help...
Sorry.
Best
Darek