Forum Discussion

mapr's avatar
mapr
Frequent Visitor
3 years ago
Solved

Show sum previous month and specific month

Hi everybody, I have been missing for a some time.   I need a card that shows the units of the previous month or a specific month, the date field may contain duplicate records from what I understan...
  • mapr's avatar
    3 years ago

    Ok, DATEADD is not ok, I need to use another formula to calculate this.

     

    Finally, I have solved with this formula:

     

    Penalizacion_Mes_Previo_VF = VAR _year = IF(MONTH(NOW())=1,YEAR(NOW())-1,YEAR(NOW()))
    Return
    CALCULATE(SUM(table[Uds]),AND(MONTH(table[date])=MONTH(NOW())-1,YEAR(table[date])= _year))