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 ,
May I ask if you have gotten this issue resolved?
If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.
Regards,
Chaithra.