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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
macgeorge
Helper I
Helper I

FIscal Year Display in Table

Hello all, apologies, I am new to Power BI and I would really appreciate your help. I am having an issue with the display of fiscal date in the table. I am using DAX below to create the Fiscal Year column and when it displays in the table the FY shows as 2019-20 which is what I want for the quarters and Q1 and Q2 are correct, however for Q3 and Q4 the FY is displayed like this 19-2020, which is wrong. I don't know why.

 

This is the DAX for Fiscal Year:

 

FY =
VAR CY = RIGHT(YEAR('Calendar'[Date]), 4)
VAR LY = RIGHT(YEAR('Calendar'[Date]) -1, 2)
VAR NY = RIGHT(YEAR('Calendar'[Date]) +1, 2)
VAR FiscalYear =
IF(
MONTH('Calendar'[Date]) >= 7,
CY & "-" & NY,
LY & "-" & CY
)
RETURN
FiscalYear
 
This is the DAX for Fiscal Quarter:
 
Fiscal Quarter =
"Q" &
CEILING(
MONTH(EDATE('Calendar'[Date],-6)),
3
) / 3
 
Ideally I want to report on events that occur in FY 20xx-xx (format) and the quarters to be displayed for the corresponding FY from 1 July 20xx to 30 June 20xx
 
This is what it looks like:
macgeorge_0-1664232058782.png

 

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

This part : LY & "-" & CY  is going to be "2 chars - 4 chars" so that's what needs to be fixed.

--

Also RIGHT should work on a text value but YEAR is going to return a number.  This may work but I would not rely on it.

View solution in original post

2 REPLIES 2
HotChilli
Super User
Super User

This part : LY & "-" & CY  is going to be "2 chars - 4 chars" so that's what needs to be fixed.

--

Also RIGHT should work on a text value but YEAR is going to return a number.  This may work but I would not rely on it.

Thank you HotChilli - that works perfectly. I appreciate your quick response. Cheers

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors