Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
philippr1991
Contributor II
Contributor II

Previous year sales till today 1 year ago

Hi and Sorry in Advance for Posting a Question 1000 other People already posted.

Ive read and tried a lot of stuff but i simply cant get it to work.

I want the Sales from last year until today 1 year ago.

Iam using the Autocalendar Dates. And my Sales are named SumGnetto

Ive tried multiple suggestions i found in this Forums for this Topic. But Nothing works so i assume theres a Major issue in my understanding of the functions since im new to set Analysis.  And I want/Need to improve.

So for example i found this solution to the Topic:

Sum({$<Year={$(=Max(Year)-1)},
Date={'<=$(=AddYears(Today(),-1))'}
>} sales)

And tought i can alter it by changing it to:

Sum({$<Datum.Autocalendaryear={$(=Max(Year)-1)},
Datum.AutocalendarDate={'<=$(=AddYears(Today(),-1))'}
>} SumGnetto)

In case the functions are wanted and not the Datefields I also tried 

Sum({$<Year={$(=Max(Year)-1)},
Date={'<=$(=AddYears(Today(),-1))'}
>} Sumgnetto)

 

I am working on this issue since days.

Thanks in advance

1 Solution

Accepted Solutions
Thiago_Justen_

Please, try it out:

 

Sum({$<Datum.AutocalendarDate={">=$(=YearStart(AddYears(Today(),-1)))<=$(=AddYears(Today(),-1))"}>} SumGnetto)

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago

View solution in original post

3 Replies
Thiago_Justen_

Please, try it out:

 

Sum({$<Datum.AutocalendarDate={">=$(=YearStart(AddYears(Today(),-1)))<=$(=AddYears(Today(),-1))"}>} SumGnetto)

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
andrey_krylov
Specialist
Specialist

Looks like the issue is with date format, try this

Sum({$<Year={$(=Max(Year)-1)},
Date={'<=$(=Date(AddYears(Today(),-1)))'}
>} Sumgnetto)

philippr1991
Contributor II
Contributor II
Author

Thank you both very much for the quick response! Andreys solution Returns all my Sales for all years but Thiagos solution worked for me!