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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Isnaan_Ahmed
Frequent Visitor

Help with Time Intelligence using Fiscal Years

Hi all!

 

Hope you can help with an issue I'm having - I am trying to create a table that lists the ordered units by Fiscal Year (this part works) with another column showing ordered units in the previous fiscal year. 

 

I have a fiscal dates table set up like this:

Isnaan_Ahmed_0-1677144260450.png

 So using the below DAX I assumed I would be able to create a table visual that shows ordered units for each FY and the previous FY also, however it is coming up blank each time:

_OrderedUnits Last FY =
VAR _SelectedFY = SELECTEDVALUE ( _FiscalDates[Fiscal Year (544)]  )
VAR _MinDate =
EDATE(
    CALCULATE (
        FIRSTDATE ( _FiscalDates[Date] ) ,
        _FiscalDates[Fiscal Year (544)] = _SelectedFY
    ),
    -12)
VAR _MaxDate =
EDATE(
    CALCULATE (
        LASTDATE ( _FiscalDates[Date] ) ,
        _FiscalDates[Fiscal Year (544)] = _SelectedFY
    ),
    -12)
VAR _Return =
CALCULATE (
    [01. Ordered Units],
    _FiscalDates[Date] >= _MinDate && _FiscalDates[Date] <= _MaxDate
)

Return
_Return
 
The table _FiscalDates has a single relationship to the Dim table using the date column. The visual currently looks like this:
Isnaan_Ahmed_1-1677144421107.png

 

Any help would be much appreciated!

 

1 REPLY 1
FreemanZ
Super User
Super User

hi @Isnaan_Ahmed 

try like:

_OrderedUnits Last FY =
VAR _SelectedFY = SELECTEDVALUE ( _FiscalDates[Fiscal Year (544)]  )
RETURN
    CALCULATE(
        [01. Ordered Units],
        _FiscalDates[Fiscal Year (544)] = LEFT(_SelectedFY, 2)&(RIGHT(_SelectedFY,2)-1)
)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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