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
ovonel
Post Prodigy
Post Prodigy

How to achieve a full year, last year measure?

I need to achieve a FULL Year measure for Last Year.

 

To achieve that, I have to… Ignore the Month and Date filters, and somehow pick the ‘Fiscal Year’ selected value and do a -1 to it.

 

My filters:

ovonel_0-1650634184125.png

 

 

For Full Year what I have is:

Sales Full Year:=



CALCULATE

([Sales] , ALL('Date'[FY & Month], 'Date'[Week Offset],'Date'[Date]))

 

This works fine!

 

 

 

But for Full Year Last Year I am doing this:

 

Sales Full Year LY:=

CALCULATE ( [Sales Full Year] , PARALLELPERIOD ( 'Date'[Date] , -12 , MONTH ) )

 

 

But it doesn’t work! How can I achieve my goal?

 

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

Hi @ovonel ,

According to your description, I create a sample.

Actually the PARALLELPERIOD can get the correct date period, but it can still be affected by the slicer, so it return blank.

vkalyjmsft_0-1651132008645.png

Modify the formula to:

Sales Full Year LY =
CALCULATE (
    [Sales Full Year],
    PARALLELPERIOD ( 'Date'[Date], -12, MONTH ),
    ALL ( 'Date' )
)

Get the correct result.

vkalyjmsft_1-1651132349551.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @ovonel ,

According to your description, I create a sample.

Actually the PARALLELPERIOD can get the correct date period, but it can still be affected by the slicer, so it return blank.

vkalyjmsft_0-1651132008645.png

Modify the formula to:

Sales Full Year LY =
CALCULATE (
    [Sales Full Year],
    PARALLELPERIOD ( 'Date'[Date], -12, MONTH ),
    ALL ( 'Date' )
)

Get the correct result.

vkalyjmsft_1-1651132349551.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Whitewater100
Solution Sage
Solution Sage

Hi:

Can this work? Example set up measures.

Sales = SUM(Sales[Sales Amt])

Sales Full Year = CALCULATE([Sales], FILTER(Dates, Dates[Year] = XXXX))  * you can choose the year, e.g. 2021

 

Sales Full Year LY:=

CALCULATE ( [Sales Full Year] , PARALLELPERIOD ( 'Date'[Date] , -1 , YEAR ) )

 

If you want to see a better over view, please see page 3 on the attached file. Here you can use the fields from the Date Table to also show you yearly sales. I hope this helps!

https://drive.google.com/file/d/1gHqCvtbQf3NeoFcVak_EF45cjH2kAiF8/view?usp=sharing 

 

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.