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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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