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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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]))
Anonymous
Not applicable

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.