Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want last two months along with current selected month in bar chart.
like selected month is Jan and year is 2018. so i want Jan 2018, Dec 2017, Nov 2017.
I have separate year field and separate month field and i am using set analysis but not getting what i want.
Please help.
Thanks
Hi,
Create a MonthYear field and use this expression:
sum({< MonthYear={">=$(=AddMonths(max(MonthYear),-3)) <=$(=max(MonthYear))" }>} your_measure)
I second youssefbelloum
driving from Selection use this.
sum({< MonthYear={">=$(=(MonthYear-2)) <=$(=MonthYear)" } >}your_measure)
Thanks
Hi,
MonthYear field is Month&Year concatenated field
So, for 012018 for example, MonthYear -2 = 012016
Yes Thanks!
so he just have to remove Max to drive it from Selection.
You make me think, here is the new (tested) one:
sum({< MonthYear={">=$(=Date(AddMonths(Date#(MonthYear,'MMYYYY'),-2),'MMYYYY')) <=$(=Date(Date#(MonthYear,'MMYYYY'),'MMYYYY'))" }>} your_measure)
Sounds good! Should be Marked Correct Answer Thank You for Sharing