Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
My YTD measure matches my MTD measure.
Solved! Go to Solution.
Hi @gatesmetbus
Maybe you can choose to write the dax without Time intelligence functions:
Abated Emergency WO MTD =
VAR _currentdate =
DAY ( MAX ( 'Day'[Date] ) )
VAR SelectedMonth =
SELECTEDVALUE ( 'Day'[Month] )
VAR SelectedYear =
SELECTEDVALUE ( 'Day'[Year] )
RETURN
IF (
NOT ( ISBLANK ( SelectedMonth ) ) && NOT ( ISBLANK ( SelectedYear ) ),
CALCULATE (
[Abated Emergency Work Orders],
FILTER (
ALL ( 'Day' ),
'Day'[Date] <= _currentdate
&& 'Day'[Date] >= DATE ( SelectedYear, 1, 1 )
)
),
BLANK ()
)
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey @gatesmetbus
Try this query for year calculation
Abated Emergency WO YTD =
VAR SelectedYear = SELECTEDVALUE('Day'[Year])
RETURN
IF(
NOT(ISBLANK(SelectedYear)),
TOTALYTD(
[Abated Emergency Work Orders],
'Day'[Date],
ALL('Day')
),
BLANK()
)
hey @elitesmitpatel ive tried that before and just not and no luck. Let me know what else I can share to help aid this
Hi @gatesmetbus
Maybe you can choose to write the dax without Time intelligence functions:
Abated Emergency WO MTD =
VAR _currentdate =
DAY ( MAX ( 'Day'[Date] ) )
VAR SelectedMonth =
SELECTEDVALUE ( 'Day'[Month] )
VAR SelectedYear =
SELECTEDVALUE ( 'Day'[Year] )
RETURN
IF (
NOT ( ISBLANK ( SelectedMonth ) ) && NOT ( ISBLANK ( SelectedYear ) ),
CALCULATE (
[Abated Emergency Work Orders],
FILTER (
ALL ( 'Day' ),
'Day'[Date] <= _currentdate
&& 'Day'[Date] >= DATE ( SelectedYear, 1, 1 )
)
),
BLANK ()
)
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hey thanks for answering i found a solution.