Forum Discussion
corange
Post Patron
7 years agoCurrent Year vs Previous Year
Hi everyone, I need some help with one of my graph. I have used a calendar table I have downloaded on the net and it worked perfectly but I have created a new report and I can't work it out anymo...
- 7 years ago
Hi,
You could create column like below
SWITCH(MONTH(rolling[DATE]),1,6,2,7,3,8,4,9,5,10,6,11,7,12,8,1,9,2,10,3,11,4,12,5)
yc = IF(AND(rolling[DATE]>Date(2017,6,30),rolling[DATE]<=DATE(2018,6,30)),"2017-2018",if(AND(rolling[DATE]>Date(2018,6,30),'rolling'[DATE]<=DATE(2019,6,30)),"2018-2019",if(AND(rolling[DATE]<=Date(2017,6,30), rolling[DATE]>Date(2015,6,30)),"2016-2017","2019-2020")))
month = MONTH(rolling[DATE])
a = CALCULATE(SUM(rolling[quantity]))
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dax
Community Support
7 years agoHi,
You could create column like below
SWITCH(MONTH(rolling[DATE]),1,6,2,7,3,8,4,9,5,10,6,11,7,12,8,1,9,2,10,3,11,4,12,5)
yc = IF(AND(rolling[DATE]>Date(2017,6,30),rolling[DATE]<=DATE(2018,6,30)),"2017-2018",if(AND(rolling[DATE]>Date(2018,6,30),'rolling'[DATE]<=DATE(2019,6,30)),"2018-2019",if(AND(rolling[DATE]<=Date(2017,6,30), rolling[DATE]>Date(2015,6,30)),"2016-2017","2019-2020")))
month = MONTH(rolling[DATE])
a = CALCULATE(SUM(rolling[quantity]))
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.