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
Anonymous
Not applicable

Dynamic SPLY Calculations incorporating slicers

Hi, I am trying to create a Dynamic SPLY Measure which updates automatically depending on what is selected in the slicers. I have 4 slicers - Year, Quarter, Month & Week. Does anyone know if it possible to create such a measure? 

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

Please have a try.

Date = CALENDARAUTO() // create date table
Current Value = CALCULATE(SUM(Data[Sales]), ALLSELECTED(Date)) // create current value measure
Previous Year Value = CALCULATE([Current Value], SAMEPERIODLASTYEAR(Date[Date])) // create previous year value measure
Dynamic SPLY Measure = [Current Value] - [Previous Year Value] // create dynamic sply measure

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

OwenAuger
Super User
Super User

Hi @Anonymous 

What difference in behaviour do you want your measure to have based on the slicer selections?

Could you give some examples with each type of slicer selection?

 

I'm guessing the default behaviour of SAMEPERIODLASTYEAR (which is based on day-of-month and anchoring to month start/end dates) won't do what you want.

 

Regards


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

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!

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.