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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vanessafvg
Super User
Super User

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,  

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @vanessafvg,

 

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

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

View solution in original post

4 REPLIES 4
v-ljerr-msft
Employee
Employee

Hi @vanessafvg,

 

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

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

Anonymous
Not applicable

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?

Thanx in advance

Anonymous
Not applicable

Hello there,
Did you get the answer for this. I also need the same thing please reply.
vanessafvg
Super User
Super User

anyone out there?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.