Forum Discussion
Current & Previous Month Difference Combine within 13 months period
- Anonymous5 years ago
Hi changhongchoo ,
From this:
Assume my slicer value is now "Jul-21", I want to show the result from "Jul-20" to "Jul-21" only.
I think you want to display the value of last 13 month not the total difference of the last 13 month,right?
If so , please create a flag measure and apply it to visual-filter pane, set as "=1":
Flag = var _sele=MAX('Date(for slicer)'[Date].[Date]) var _datediff=DATEDIFF(MAX('Table'[Date]),_sele,MONTH) return IF( _datediff>=0 && _datediff<13,1,0)Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi changhongchoo ,
From this:
Assume my slicer value is now "Jul-21", I want to show the result from "Jul-20" to "Jul-21" only.
I think you want to display the value of last 13 month not the total difference of the last 13 month,right?
If so , please create a flag measure and apply it to visual-filter pane, set as "=1":
Flag =
var _sele=MAX('Date(for slicer)'[Date].[Date])
var _datediff=DATEDIFF(MAX('Table'[Date]),_sele,MONTH)
return IF( _datediff>=0 && _datediff<13,1,0)
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Thank you for the solution, I have solved the issue by following another reference.
https://www.youtube.com/watch?v=d8Rm7dwM6gc&t=1079s
Regards
Choo