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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors