Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with expression

I have the following expression

=(Sum({<CalendarDate={'>=$(=AddMonths((MonthStart(Today())),-12))<=$(=mONTHEND(AddMonths((Monthend(Today())),-1)))'}>} AccountBalance)*-1)

and it works well with getting the previous 12 months., But I need to divide that expression with basically the same formula, but I only want to see when 'NewFRXTitle={Sales}' the total of that.

I am trying to get percentage of sales, here is my working formula, but it won't do previous 12 months, I am trying to get the formula below to work with the formula above for the previous 12 months.

Sum(AccountBalance)/Sum({<NewFRXTitle={Sales}>}total <[CalendarYear]> AccountBalance)

Please don't send any files as I only have qlikview personal edition.  any help much appreciated

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

This?


(Sum({<CalendarDate={'>=$(=AddMonths((MonthStart(Today())),-12))<=$(=monthend(AddMonths((Monthend(Today())),-1)))'}>} AccountBalance)*-1)

/

(Sum({<NewFRXTitle={Sales}, CalendarDate={'>=$(=AddMonths((MonthStart(Today())),-12))<=$(=monthend(AddMonths((Monthend(Today())),-1)))'}>} AccountBalance)*-1)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

This?


(Sum({<CalendarDate={'>=$(=AddMonths((MonthStart(Today())),-12))<=$(=monthend(AddMonths((Monthend(Today())),-1)))'}>} AccountBalance)*-1)

/

(Sum({<NewFRXTitle={Sales}, CalendarDate={'>=$(=AddMonths((MonthStart(Today())),-12))<=$(=monthend(AddMonths((Monthend(Today())),-1)))'}>} AccountBalance)*-1)


talk is cheap, supply exceeds demand
Not applicable
Author

Works perfect,thanks!