Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213916

dateadd and max error

$
0
0

Hello,

 

I am trying to calculate the sales for the past year( going back a year, not civil year), using a slicer.

This means that when I choice in a slicer dates between (23-01-2014 and 23-02-2016) I want the formula to read only the bigger value (23-02-2016). This I got the measure to do it with:

 

FILTER(all('date table'[Date]);'date table'[Date]<=MAX('date table'[Date])

 

But now I need to get it to go back one year and I tried :

 

FILTER(all('date table'[Date]);'date table'[Date]<=DATEADD(MAX('date table'[Date]);-1;YEAR)))

 

But I get the following error:

 

imagem.png

 

Can anyone help me?

 

Thank you

 

Inês Costa


Viewing all articles
Browse latest Browse all 213916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>