cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
shailendransit
Regular Visitor

Previous Fiscal Year value not calculated correctly

I am trying to get premium value for previous fiscal year and consequently Growth over fiscal year. However, none of the below DAX query giving me correct result. 

---------------------DAX to get Premium value for last fiscal year with SAMEPERIODLASTYEAR function--------------------------

TotalPremium_PY =
VAR LY = CALCULATE(
        [_TOTALPREMIUM],
        SAMEPERIODLASTYEAR('Fiscal Year Calander'[Date].[Date])
    )
RETURN
    LY
-------------------------------DAX to get Premium value for last fiscal year with DATEADD function----------------------------------
TotalPremium_PY =
VAR LY = CALCULATE(
        [_TOTALPREMIUM],
        DATEADD('Fiscal Year Calander'[Date].[Date], -1, Year)
    )
RETURN
    LY
Though the Fiscal Year Calender is related M to M, for calculation, I am filtering out the fiscal year calender so as to give 1 to M relation.
shailendransit_0-1680000987757.png

For both the above DAX, The result is good if report is viewd against Year in one column 

shailendransit_1-1680001108157.png

But the DAX fails to give correct result when viewed against Fiscal year, which is a column of fiscal year calender table.  

Here the Current FY Premium and Last FY Premium is same, which is not correct.

shailendransit_2-1680001246553.png

 

Can anyone help with where I am getting wrong.

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @shailendransit,

I think the time intelligence function may not suitable to work with fiscal date.
Perhaps you can try to use date function to get the current date based on current fiscal date, then you can use this as condition to calculate with previous range records.

Time Intelligence "The Hard Way" (TITHW)  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @shailendransit,

I think the time intelligence function may not suitable to work with fiscal date.
Perhaps you can try to use date function to get the current date based on current fiscal date, then you can use this as condition to calculate with previous range records.

Time Intelligence "The Hard Way" (TITHW)  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors