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

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

Reply
Pandetbaby
Frequent Visitor

Getting the difference of a value between two seperate time slicers.

Hey Everyone, 

 

I'm trying to figure out a measure to give me what the difference between two time slicers are. 

We're trying to find out how many events has happened in the current date, the previous date and get a measure to determine what the movement between has been. 

 

I've seperated the Dates into two sheets form the samesource, one will be my "Comparison Month" and the other "Current Month"

 

The formulas are as follows, and both of them give me the correct answer. 

Comparison Month= calculate([Count Total Instances],filter('Workforce','Workforce'[Start Date ]= max('Start Date Comparison'[Start Date ])))
 
Current Month = calculate([Count Total Instances],FILTER('Workforce','Workforce '[Start Date ]=max('Workforce'[Start Date (bins)])))
 
Problem occurs when I want to make the measure to subtract Current from the Comparison. I use the formua
Movement = [Current Month] - {Comparison Month] 
However, for some reason it appears that the comparison is = 0, as this formula just returns to Current Month
 
E.g.
Current Month= 10
Comparison Month = 8
Movement=10 (when it should be 2)
 
Thank you!
2 REPLIES 2
amitchandak
Super User
Super User

@Pandetbaby , I have a blog on two date range comparison, see if somehow can help in this case

https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
AlB
Community Champion
Community Champion

Hi @Pandetbaby 

Have you checked that both measures [Current Month] and [Comparison Month] return the correct result if you use them exactly in the scenario where you want to use [Movement] ? If so, [Movement] should certainly work. You show 

Movement = [Current Month] - {Comparison Month]

instead of the correct

Movement = [Current Month] - [Comparison Month]

but I'm guessing that's just a typo

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

   

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.