Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I am trying to write a measure that will display the total number of months between the two dates in my date range slicer. How do I refer to the slicer itself? Or if there is a better way do this, please let me know.
Thank you so much in advance.
Solved! Go to Solution.
@Ahmedelshark , Create a new measure
diff between selected range =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = minx(allselected('Date'),'Date'[Date])
return
datediff(_min, _max, month)
Hi Sir,
I am also searching on the same issue that time i found your solution , I have tried but finding an error. Could you please help me with this.
if starting date is 01-04-2022 & ending date is 31-08-2022, According to your formulae it will show 4 months in between but actually its 5(apr,may, june, july, august)
How can we solve this?
Thank you in adavance
@Ahmedelshark , Create a new measure
diff between selected range =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = minx(allselected('Date'),'Date'[Date])
return
datediff(_min, _max, month)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |