Forum Discussion
Syndicate_Admin
Administrator
4 years agoerror in formula dax
good afternoon, I have a design I capture the year and month of the slicer, I need to get a value for the same period of a year before, for which I make the following formula mes_ant = D...
Syndicate_Admin
Administrator
4 years agoI currently only have one table as shown in the image
what I want is from selecting a month
get the value of the value column for a previous year and the previous month
lbendlin
Super User
4 years agoYou need to modify the filter context to include the full table, by using ALL() or similar.
- Syndicate_Admin4 years ago
Administrator
hello, what a pity it is not very clear to me how to do it, you help me on the formula as serious that pity
total_mes_ant = calculate(SUM(Hoja1[Value]),FILTER(Hoja1,Hoja1[my]=[mes_ant]))- lbendlin4 years ago
Super User
something like
total_mes_ant = var mes_ant = EDATE(SELECTEDVALUE(Hoja1[my]),-12) return calculate(SUM(Hoja1[Value]),ALLSELECTED(),Hoja1[my]=[mes_ant])or
total_mes_ant = calculate(SUM(Hoja1[Value]),SAMEPERIODLASTYEAR(Hoja1[my]))- Syndicate_Admin4 years ago
Administrator
generates the following error