Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
powerqlik
Contributor III
Contributor III

Scripting

Hello fellow Qlikview users.  Can someone please help modify my script to be able to calculate remaining obligation expense?  Thanks in advance!

The script below calculates the total lease obligation.  I want to be able to modify this script so that it would calculate the total remaining lease obligation as of this month or as of today.


(sum({$<LocalLeaseTypeExpenses = {Lease}, Expense = {"*"}>} Amount))

22 Replies
sunny_talwar

Would you be able to post a screenshot of ExpenseMonthYear field in a list box object?

powerqlik
Contributor III
Contributor III
Author

Sure, please see attached.  It doesn't seem to recognize the formula right after {"*"},   which is odd because it doesn't error out the formula in the pivot table (please see above), it just displays a 0.  With that being said, the amount in the list box now displays the total of the entire lease (i.e. 24 months or 36 months, etc)Capture.JPG

powerqlik
Contributor III
Contributor III
Author

Hi Sunny, I just wanted to follow up and see if there was anything else I may be able to do to correct the script?  Thanks in advance!

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Maybe provide what he asked for: "a screenshot of ExpenseMonthYear field in a list box object"?

powerqlik
Contributor III
Contributor III
Author

Peter,

I did reply to his request on 8/31/17 with a screenshot and an explanation that it does not seem to recognize the script after {"*"}, (please see above). 

Attached is another screenshot.  The amount shown for Washington is the total expense for the entire term, not as of this month.  Thanks.Capture.JPG

sunny_talwar

Do you have a field called ExpenseMonthYear in your dashboard? It appears as if you don't.... Did you reload your dashboard after you added ExpenseMonthYear to your script?

powerqlik
Contributor III
Contributor III
Author

Hi Sunny, I may have not reloaded the data because after reloading, ExpenseMonthYear now became a field.  With that being said, even though it recognizes the formula, it does not display the correct response as now it reflects the total expense as 0.  Please see attached and thanks for spending so much time on this trying to help me get it right.Capture.JPG.

sunny_talwar

and you are 100% sure that there are period values beyond September?

powerqlik
Contributor III
Contributor III
Author

Yup, that is correct.  Please see screenshot.Capture.JPG

sunny_talwar

Don't really know... would you be able to share your qvw?

Preparing examples for Upload - Reduction and Data Scrambling

Uploading a Sample