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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ashwinkolte
Helper III
Helper III

Relative date slicer

Hi

 

I have a relative date slicer. Something like this which we all know

ashwinkolte_0-1719038655189.png

I want to calculate variance of measure (lets says sum of sales) from  equivalent previous period .

For e.g 

If the user selects "Last 7 days" in the slicer then I want to calculate variance from last 7 days prior to the selected "Last 7 days" of the slicer . I understand for this we can use selected value measure and find max and min dates of the slicer and use it . The challenge is here -  

 

If the user selects "Last 1 Calender month" in the slicer then I want variance from its previous calender month . E.g if the last calender month is May 24 , then I want variance from Apr 24 , although the number of days in April and May  differ . I want to identify what level the slicer is i.e day , week, month, year level and then calculate from its  previous period . I dont want to calcuate 31 days of May month  and go back 31 days from 30 April. 

 

Hope I am able to articulate the question . 

Any help will be greatly appreciated  

 

2 REPLIES 2
lbendlin
Super User
Super User

Use a disconnected dates table and the filter pane. It has all these advanced filtering options already available.

 

If you want PPTD (previous period to date) then add an additional filter of "is before today in PP".  Ideally you have that precomputed in the calendar table and the calendar table is in import mode and refreshed daily.

Hi @lbendlin   .. Thanks for responding but I didnt quite understand what is disconnected date table. Please elaborate 

Basically , here is my requirement - If the user selectes past  3 calender months using the given slicer  (which translates to say Jun,May,Apr) , then I have to calculate variance from prior three months i.e Mar,Feb,Jan. Or if user selects 7 days then I have to calculate variance from 7 days prior to these selected 7 days . What is the best way to achieve this ?  The user may select any number of days or months or even years uing the relative date slicer 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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