Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Previous month dax

hello every body,

i work in a project and i can't use previous month measure. 

I trie different solution :

prev month test = CALCULATE([sum relance2];PREVIOUSMONTH(Calendrier[Date]))

previous motnh 2 = CALCULATE(SUM('suivi écarts'[RELANCE_2]);
FILTER(Calendrier;MONTH(Calendrier[Date])=MONTH(TODAY())-1);
FILTER(Calendrier;YEAR(Calendrier[Date])= IF(MONTH(TODAY())=1;YEAR(TODAY())-1;YEAR(TODAY()))))
 
var current_month=MONTH(TODAY()) return CALCULATE(SUM('suivi écarts'[RELANCE_2]);FILTER(Calendrier;MONTH(Calendrier[Mois])=current_month -1))
 
i realise the measure for current month, but for previous month i can not.

Than and excuse me for my english guys


2 Replies