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: 
shamitshah
Partner - Creator
Partner - Creator

Set Analysis

Hi ,

Please see attached.

I am trying to get today's sales figure and the year to date sales figure in a text box, but not getting any result with the current expression.

So, if today's date is 23 Jan 2017, the figure for today's sales should be 1,000 and the year to date figure should be 314,044

Any idea where I am going wrong?

Thanks

1 Solution

Accepted Solutions
sushil353
Master II
Master II

Hi,

Just change your environmental variable as

SET DateFormat='DD-MMM-YY';

SET TimestampFormat='DD-MMM-YY h:mm:ss[.fff] TT';

and expression :

='$'&num(SUM({<Date={"$(=date(vDisplayDate,'DD-MMM-YY'))"}>}Sales),'#,##0','.',',')

YTD: ='$'&num(SUM({<Date={"<=$(=date(vDisplayDate,'DD-MMM-YY'))"}>}Sales),'#,##0','.',',')

HTH

Sushil

View solution in original post

4 Replies
sushil353
Master II
Master II

Hi,

Just change your environmental variable as

SET DateFormat='DD-MMM-YY';

SET TimestampFormat='DD-MMM-YY h:mm:ss[.fff] TT';

and expression :

='$'&num(SUM({<Date={"$(=date(vDisplayDate,'DD-MMM-YY'))"}>}Sales),'#,##0','.',',')

YTD: ='$'&num(SUM({<Date={"<=$(=date(vDisplayDate,'DD-MMM-YY'))"}>}Sales),'#,##0','.',',')

HTH

Sushil

Anil_Babu_Samineni

Try to change env variables, Becuase you have DD-MMM-YY Format. But Date gave only DD-MM-YYYY

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
shamitshah
Partner - Creator
Partner - Creator
Author

Thanks Sushil.

shamitshah
Partner - Creator
Partner - Creator
Author

Thanks Anil.