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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
israrkhan
Specialist II
Specialist II

Straight Table Calculation...

Hi Guys..

i have a table like below..

in straight table i want to calculate the balanceamount, my dimension is DocCode,

and expression is sum({<DISTDATE = {"<= $(=Max(Date(DISTDATE,'DD/MM/YYYY')))"}>} BalanceAmount)

its giving me 0,

let say if i select date 20/04/2014, the balance amount must be 500,

and if i chose date 22/04/2014 the balanceamount must be 300, (which is 500-200)

date format is DD/MM/YYYY..

HOW TO USE <= OPERATOR IN SET ANALYSIS....VERY SIMPLE BUT NOT WORKING ....

PLEASE SUGGEST....

Header 1Header 2Header 3
DocCodeDisDateAmount
120/04/2014500
122/04/2014-200
125/04/2014-300
230/04/2014800
Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try by creating a variable and then doing it.

It worked for me when I did this:

vMaxDate = Date(Max(DisDate))

Expression: Sum({<DisDate = {'<=$(vMaxDate)'}>} Amount)

HTH

Best,

S

View solution in original post

4 Replies
sunny_talwar
MVP
MVP

Try by creating a variable and then doing it.

It worked for me when I did this:

vMaxDate = Date(Max(DisDate))

Expression: Sum({<DisDate = {'<=$(vMaxDate)'}>} Amount)

HTH

Best,

S

hic
Former Employee
Former Employee

You need to use

   =Date(Max(DISTDATE),'DD/MM/YYYY')

instead of

   =Max(Date(DISTDATE,'DD/MM/YYYY'))

HIC

Not applicable

Hi,

Use this Application.

Regards

Vimlesh

awhitfield
Partner - Champion
Partner - Champion

Can you post a sample of the data being loaded in an xls, the names of fields in you screen shot appear to be different from those in the expression formula.