Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
yadav_anil782
Creator II
Creator II

calculation error

HI qlik experts,

i'm  giving  this expresion  to calculate Balance Amount -

=(([Received Collection]+[Future Collection])-([Paid Amount]+[Future amount])))+Alt(Above([Net  Amount]),0)

but i need to calclate "Future amount " from current day

so with the currect day variable "vtoday"(let vtoday = today()) i changed calculation

so now expresion is=(([Received Collection]+[Future Collection])-([Paid Amount]+(vtoday>=[Planned Projects  Outflow])))-Alt(Above([Net  Amount]),0)

but result is not correct

 

YearReceived CollectionFuture CollectionPaid AmountFuture amount
20101,421.0401107.0982450.00
2011441.750475.46097620.00
2012651.470553.94005980.00
2013868.570708.9294924588.64
20141,327.1701195.169367450.52
2015409.84189.8604829462.213479644.23
20160.00448.50479630897.06
20170.00142.39163340448.40
20180.0072.152027940256.26
20190.0029.5961523409.10
9 Replies
sushil353
Master II
Master II

Hi,

what is this condition: vtoday>=[Planned Projects  Outflow]

yadav_anil782
Creator II
Creator II
Author

vtoday is variable , i'm putting for take more then current date value from "Future amount"

but i'm not getting currect value from this

jafari_ervin
Creator III
Creator III

Hi,

Please upload your sample Qvw File.

Best,

Kushal_Chawda

Try,

=(sum([Received Collection])+sum({<[Planned Projects  Outflow]={">=$(vtoday)"}>}[Future Collection]))-(sum([Paid Amount])+sum({<[Planned Projects  Outflow]={">=$(vtoday)"}>}[Future Collection]))-Alt(Above([Net  Amount]),0)

make sure that Format of vtoday should match with [Planned Projects  Outflow]

yadav_anil782
Creator II
Creator II
Author

app size is too big,  i' again  repeting things which i 'm facing to develop.

i'm using this table  and i want a new coumn "balance amount". for that i need to calculate  (collection- amount)

in this table  there are 4 coumn - two column belong to collection and another two column belongs to amount

logic is  current (collection+ future collection )-(paid amount+ future amount)) but future amount i need to calculate only form current system date after then  it will be call future amount

so now expresion is=(([Received Collection]+[Future Collection])-([Paid Amount]+(vtoday>=[Future amount])))-Alt(Above([Net  Amount]),0)


here vtoday is variable , i dont know its giving morethen today future amount  or not but my  result is coming wrong

YearReceived CollectionFuture CollectionPaid AmountFuture amount
20101,421.0401107.0982450.00
2011441.750475.46097620.00
2012651.470553.94005980.00
2013868.570708.9294924588.64
20141,327.1701195.169367450.52
2015409.84189.8604829462.213479644.23
20160.00448.50479630897.06
20170.00142.39163340448.40
20180.0072.152027940256.26
20190.0029.5961523409.10
yadav_anil782
Creator II
Creator II
Author

"planned project out flow"and "future collection" column is same  there are only 4 column which i shared in table

qlikmsg4u
Specialist
Specialist

What is your date column to compare today date variable? with out date column how can you get Future Amount for today date?

Kushal_Chawda

There should be some Date to compare with vToday. Put that date in place of planned project out flow in my expression

yadav_anil782
Creator II
Creator II
Author

i have date in my data modling and i'm puting variable form that date . i need  healp only in scipt error which is wrong