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
LachlanO
Regular Visitor

Calculate same period last year from timeframe slicer

Hi all,

 

I have one master graph which the data is populated based on the selected slicers.

 

I am trying to calculate actual enquiries recieved as well as for the same period last year (which this timeframe is specified via the Timeframe slicer). Ideally would like a measure which is dynamic so that the same period last year is calculated based on the filtered Timeframe selections.

Thanks.

 

LachlanO_1-1700442013676.png

 

1 ACCEPTED SOLUTION
LachlanO
Regular Visitor

Believe I have solved it:
=
VAR TimeframeSlicer = SELECTEDVALUE('Date Parameter (table)'[Parameter])
Return CALCULATE([Enquiries], SAMEPERIODLASTYEAR(table[EnquiryDate].[Date]))

View solution in original post

2 REPLIES 2
LachlanO
Regular Visitor

Believe I have solved it:
=
VAR TimeframeSlicer = SELECTEDVALUE('Date Parameter (table)'[Parameter])
Return CALCULATE([Enquiries], SAMEPERIODLASTYEAR(table[EnquiryDate].[Date]))

Hi @LachlanO ,

It's glad to hear that your problem has been resolved. And thanks for sharing your solution here. Could you please mark your post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours.  Thank you.

Best Regards

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

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.