Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sakshikaul
Creator II
Creator II

Expression is giving no result

paint.png

here in above image the datatype used in database is user defined ie Money. Now when I am writing an expression its not giving correct result. Following is the expression :-

=sum({< Sold_Date = {">=$(From)<=$(To)"} >}[inv value] )

can be seen in the below image

PAINT2.png
But if I am using expression as sum([inv value] its giving me correct answer

and for conversion I have used following in the script.

Date(vouch_date, 'YYYY-MM-DD') as Sold_Date,

Please help

24 Replies
tresesco
MVP
MVP

Try:

=sum({< Sold_Date = {">=$(=Date(From, 'YYYY-MM-DD'))<=$(=Date(To, 'YYYY-MM-DD'))"} >}[inv value] )

arvind1494
Specialist
Specialist

sum({< Sold_Date = {">=$(=date(From))<=$(=date(To))"} >}[inv value] )

sakshikaul
Creator II
Creator II
Author

bOTH OF THEM ARE NOT GIVING ANY RESULT

arvind1494
Specialist
Specialist

If possible then Please send your data

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Maybe:

=sum({< Sold_Date = {">=$(=Date($(=From), 'YYYY-MM-DD'))<=$(=Date($(=To), 'YYYY-MM-DD'))"} >}[inv value] )

lorenzoconforti
Specialist II
Specialist II

When you hover the mouse over the Sold_Date field in the table view, does it show as $date tag?

jyothish8807
Master II
Master II

May be this:

=sum({< Sold_Date = {">=$(=Date($(From), 'YYYY-MM-DD'))<=$(=Date($(To), 'YYYY-MM-DD'))"} >}[inv value] )


Just check the out put of both the variables in a text box to be sure:

1. Date($(From), 'YYYY-MM-DD')

2. Date($(To), 'YYYY-MM-DD')


Br,

KC

Best Regards,
KC
juraj_misina
Luminary Alumni
Luminary Alumni

You need to format your Sold_Date field as a date in script:

Date#(Sold_Date, 'YYYY-MM-DD')     ad SoldDate

From the screenshot it seems that it is a text field, which makes it impossible to do > and < comparisons.

Hope this helps.

Juraj

sakshikaul
Creator II
Creator II
Author

Hi

I am getting following result

PAINT2.png