Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hi all, I am using two measures that calculate revenue as of today. I have one for the current year and one for the prior year. These measures allow me to compare the reservation amounts as of today vs today last year.
I am trying to find the year over year difference between the two, but I can't just subract them since the numbers are attached to the unique dates. Could anyone help with this? Thank you so much. Here are my measures:
Solved! Go to Solution.
@abeirne , best in such case to use date table
YTD Today =
var _min = eomonth(today(),-1*month(today()))+1
var _max = today()
return
CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))
LYTD Today =
var _today = TODAY()
var _max = date(year(_today)-1, month(_today), day(_today))
var _min = eomonth(_max,-1*month(_max))+1
return
CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))
Thank you! Also what i did was just make both of my measures into variables and returned both of them so that they are in one measure, then I was able to compare. Thanks!
@abeirne , best in such case to use date table
YTD Today =
var _min = eomonth(today(),-1*month(today()))+1
var _max = today()
return
CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))
LYTD Today =
var _today = TODAY()
var _max = date(year(_today)-1, month(_today), day(_today))
var _min = eomonth(_max,-1*month(_max))+1
return
CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 14 | |
| 11 | |
| 8 | |
| 5 | |
| 5 |