Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mnodgers8
Contributor
Contributor

Dynamic Prior 6 Months

Hi!

I am trying to create a line graph that looks at the prior six months relative to the current date so that it remains dynamic. I have Month as the Group, Referral Source as the Line, and the Referral Sum as the Height of the line. I've tried a few of the formulas as well as using MonthYear, but I am either missing something or not using them correctly as I have only gotten errors. I have a screenshots below but that's pretty much the extent of the data I can share due to sensitive data, but hoping someone can help me solve my problem!

mnodgers8_0-1629903864434.png

mnodgers8_1-1629903903931.png

Thanks!

 

3 Replies
lironbaram
Partner - Master III
Partner - Master III

Hi, 
You can use an expression like this:
For the expression, I use the assumption that you have a field called DateField.

 

sum({<DateField={">=$(=monthstart(addmonths(Today(),-5)))"}>}Referal)

 

mnodgers8
Contributor
Contributor
Author

Hi!

Thanks for responding! I replaced Sum(Referral) with the formula above, while I didn't get a formula error, I don't think it's aligning correctly. I still see back to January. I do have a sheet filter, but I thought the formula would automatically filter for today - 6 months prior to the sheet filters that are user dependent. Any suggestions?

mnodgers8_0-1629991273849.png

Thanks!

lironbaram
Partner - Master III
Partner - Master III

yes, you need to use your actual date field name in the set analysis and make sure that the format of the date in the expression is the same as in your date field in the app