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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Need Help

Hi All,

I have data like :

Datekey Units

July18   10
Aug18   20
Sep18    30
Oct18    40
Nov18   50
Dec18    60
Jan18     50
Feb18    40
Mar18   30
Apr18    20
MAy18   10
Jun18     10
July19    50
Aug19   60
Sep19    70
Oct19    80
Nov19   10
Dec19    20
Jan19    30
Feb19   10
Mar19   10
Apr19     30
MAy19   40
Jun19     70

 

I want a graph to show

          Current YEar   Previous Year

July            10             50

August        20             60

And so on 

(My fiscal calendar  starts from July so I cant use normal date functions)

 

 

 

3 REPLIES 3
Anonymous
Not applicable

Do you mean something like this?

 

code.png

All i did was Split the column on the last 2 characters. Meaning it can now distict the values between 2018 and 2019.

Anonymous
Not applicable

its not that simple, to make it easy i gave a sample data. Originally my data is present in  2 different tables, one is date table other is my fact table and both the tables are realted using the datekey. I need some kind of dax formula to do it like sameperiodlastyear etc, but the problem is my fiscal year starts from july so the date functions wont work properly.

Anonymous
Not applicable

its not that simple, to make it easy i gave a sample data. Originally my data is present in  2 different tables, one is date table other is my fact table and both the tables are realted using the datekey. I need some kind of dax formula to do it like sameperiodlastyear etc, but the problem is my fiscal year starts from july so the date functions wont work properly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors