Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
C_Howarth
Contributor II
Contributor II

Rolling 12 sales from end of selected period

I am trying to write a expression to calculate Rolling 12 sales from the end of a selected period what I have so far is:

sum({<[flag sample] = {0}, distributor_flag = {0},month = , [month description] =, Date = {">$(=addmonths(max({<[month code] = {$(=(Year(Today())&GetFieldSelections([month])))}>}[date]),-12))<=$(=max({<[month code] = {$(=(Year(Today())&GetFieldSelections([month])))}>}[date]))"}>} [oneforce sales] * [exchange rate])

 

When i dont include the "Month = " part it obviously only shows me the sales for the 1 selected period however when I do include it it is bringing back heavily exaggerated sales

 

any help is greatly appreciated

1 Solution

Accepted Solutions
C_Howarth
Contributor II
Contributor II
Author

solving my own question again but noticed that I was using the Date function rather than [date] field

View solution in original post

1 Reply
C_Howarth
Contributor II
Contributor II
Author

solving my own question again but noticed that I was using the Date function rather than [date] field