March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Register NowGet certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
62 | |
27 | |
25 | |
22 | |
16 |