cancel
Showing results for
Did you mean:
Highlighted
Super User I

## DAX Calculation - Previous Period using Fiscal Year

Hi

i have a date dimension which has fiscal year periods defined in it, as well as calendar year periods

I am trying to get the Previous Years Fiscal Month Revenue

Previous Year Revenue = CALCULATE(
SUM('Registrations'[Revenue]),
FILTER(ALL('Date'),
'Date'[Fiscal Month] = 'Date'[Fiscal Month]
&& 'Date'[FYYear]='Date'[FYYear]-1))

unfortunately this is returning blank data,

Proud a to be a Datanaut!
1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft

## Re: DAX Calculation - Previous Period using Fiscal Year

Hi @vanessafvg,

Could you try the formula below to see if it works?

```Previous Year Revenue =
VAR currentFYYear = 'Date'[FYYear]
VAR currentFiscalMonth = 'Date'[Fiscal Month]
RETURN
CALCULATE (
SUM ( 'Registrations'[Revenue] ),
FILTER (
ALL ( 'Date' ),
'Date'[Fiscal Month] = currentFiscalMonth
&& 'Date'[FYYear]
= currentFYYear - 1
)
)```

Regards

4 REPLIES 4
Super User I

## Re: DAX Calculation - Previous Period using Fiscal Year

anyone out there?

Proud a to be a Datanaut!
Microsoft

## Re: DAX Calculation - Previous Period using Fiscal Year

Hi @vanessafvg,

Could you try the formula below to see if it works?

```Previous Year Revenue =
VAR currentFYYear = 'Date'[FYYear]
VAR currentFiscalMonth = 'Date'[Fiscal Month]
RETURN
CALCULATE (
SUM ( 'Registrations'[Revenue] ),
FILTER (
ALL ( 'Date' ),
'Date'[Fiscal Month] = currentFiscalMonth
&& 'Date'[FYYear]
= currentFYYear - 1
)
)```

Regards

Frequent Visitor

## Re: DAX Calculation - Previous Period using Fiscal Year

Hello Guys.

I am in a similar situation, I need to get the sales for the WHOLE last fiscal year (for current date).

But when I try this formula, I get Error:

Error: Calculation error in measure 'Sell In Full Last Year': A single value for column 'Fiscal Year' in table 'Date' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

How should it be changed?

Frequent Visitor

## Re: DAX Calculation - Previous Period using Fiscal Year

Hello there,

Announcements

#### New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

#### ‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

#### Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

#### Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

#### Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors