Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
18 | |
18 | |
17 | |
16 |
User | Count |
---|---|
28 | |
27 | |
19 | |
15 | |
14 |