Forum Discussion
Issue with TotalMTD Calculation.
- 1 year ago
Hi AThakur1 ,
Try the below DAX,
MTD Consumption =
var_CurrentMonth = MONTH(TODAY())
var_CurrentYear = YEAR(TODAY())
var_Hasdatathismonth =
CALCULATE(COUNTROWS(Consumption),
FILTER(
Consumption,
MONTH(Consumption[Consumption Date]) = _CurrentMonth &&
YEAR(Consumption[Consumption Date]) = _CurrentYear
)
) > 0
RETURN
IF(Hasdatathismonth, TOTALMTD(SUM(Consumption[Qty Consumed]), 'Date'[Date]),BLANK()
It checks if the item has any consumption in April, and only then it shows MTD otherwise shows blank.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks and Regards,
Chaithra E.
Hi @AThakur1 ,
We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Chaithra.