Forum Discussion

Sdhn420's avatar
Sdhn420
Helper IV
5 years ago
Solved

Constant Value

Hi,  I have calculated average sales in the last 3 months.   VAR DURATION = DATESINPERIOD('d_Calender'[Date],LASTDATE(inv[RptMth]),-3,MONTH) RETURN CALCULATE([SalesQty],DURATION))/3   I need thi...
  • v-henryk-mstf's avatar
    5 years ago

    Hi Sdhn420 ,


    According to my understanding, the reason why the test formula you used is reporting an error is because format("30.06", "dd.mm.yyyy") returns a text type, not a date type, so an error will be reported. Try the following formula:

     


    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.


    Best Regards,
    Henry


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.