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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Time intelligence variations with time slicer

Hi everyone!

I need to be able to calculate variations in sales quantity based on a date filter. For example, if I have selected a month in the filter, it should show the variation compared to the previous month. If a year is selected, it should display the variation from the previous year. Additionally, if a day is selected in the filter, it should show the variation from the previous day, and if a week is selected, it should show the variation from the previous week—all based on the same filter. In other words, the "-1" period relative to what is filtered.

Does anyone know how to achieve this?

Thank you very much!

1 REPLY 1
Villezekeviking
Most Valuable Professional
Most Valuable Professional

You can make use of my DAX Calendar that has offset-columns for days, weeks, months, quarters and years from today for any kind of relative date filtering!

 

I would create a measure that runs a switch on a "SelectedValue" in your filter.

If you've selected a year, it runs the offset on the year-column etc.



You'll find it here:
https://www.villezekeviking.com/dax-tables-calendar-and-time/

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors