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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
wangjuan303
Helper III
Helper III

How to create measure for Compare two date different value

I need create report like this style, to compare two date Sales different : 

wangjuan303_0-1637289935192.png

Power bi can create report like this: 

wangjuan303_1-1637290015193.png

our data source is simple, single fact table, Date slicer will just choose two date, 

 I want find the easy way to create measure for Diff and Diff%. 

Is any one have good suggestion, 

Thank you  ahead. 

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@wangjuan303 , Using one slicer 2 selected date diff

 

diff =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = minx(allselected('Date'),'Date'[Date])

return
calculate(sum(Table[value]), filter(date, Date[Date] =_max)) - calculate(sum(Table[value]), filter(date, Date[Date] =_min))

 

 

or refer

How to use two Date/Period slicers :https://www.youtube.com/watch?v=WSeZr_-MiTg

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

View solution in original post

Thank you so much, It is nice solution, 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@wangjuan303 , Using one slicer 2 selected date diff

 

diff =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = minx(allselected('Date'),'Date'[Date])

return
calculate(sum(Table[value]), filter(date, Date[Date] =_max)) - calculate(sum(Table[value]), filter(date, Date[Date] =_min))

 

 

or refer

How to use two Date/Period slicers :https://www.youtube.com/watch?v=WSeZr_-MiTg

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

Thank you so much, It is nice solution, 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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