Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
corange
Post Patron
Post Patron

Current 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 anymore.

 

I am based in Australia, so our FY runs from July to June. How to I set the date so the graph compare from July not Jan?

 

Capture22.PNG

 

 

I am unsure of the type of info you would require to help me. Basically, I have used the following formula to create my FY groups : Financial Year = IF(AND('Calendar'[Date]>=Date(2016,7,1),'Calendar'[Date]<=DATE(2017,6,30)),"2016-2017"

 

For P1 & P2, I have used the group function. All date from 1 to 15 into P1 for example.

 

Thank you.

 

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

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]))

 

Capture222.PNG

Capture223.PNG

Capture224.PNG

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.

 

View solution in original post

1 REPLY 1
dax
Community Support
Community Support

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]))

 

Capture222.PNG

Capture223.PNG

Capture224.PNG

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.

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.