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.
Hi,
I need to calculate the No.of days from start of the year till the selected date in the slicer.
Please help in a dax .
Thanks in advance!!
Preeti Yadav
Solved! Go to Solution.
@Preeti_Yadav
You the following measure:
Days YTD =
var __dateselected = MAX(Dates[Date]) return
DATEDIFF(
DATE( YEAR(__dateselected), 1 , 1 ),
__dateselected,
DAY
)+1
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Preeti_Yadav
You the following measure:
Days YTD =
var __dateselected = MAX(Dates[Date]) return
DATEDIFF(
DATE( YEAR(__dateselected), 1 , 1 ),
__dateselected,
DAY
)+1
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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 |
---|---|
45 | |
25 | |
19 | |
16 | |
8 |
User | Count |
---|---|
65 | |
50 | |
45 | |
20 | |
17 |