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: 
mohitd910
Creator II
Creator II

Variables are creating problem while deploying the QlikSense Application

Dear Friends,

I have a variable vMaxDate=Date(Max(Date_Date),'DD/MM/YYYY') = 31/OCT/2016

and this set analysis ;-  sum({$<Date_Date={"$(=vMaxDate)"},Flag={'ATTENDED DOCTOR REVENUE'}>} SELFPAYER_LC - DISCOUNT + PAYER1_LC)

it is working fine when i am working on QlikSense Desktop.

But when i am deploying this app on then Variable is showing 30/Dec/1899

and when i created a new variable there it is showing  correct date but not working in the same set analysis

why ???

gwassenaar

stalwar1

mrkachhiaimp

mto

jagan

8 Replies
vinieme12
Champion III
Champion III

Add an equal to sign

sum({$<Date_Date={" = $(=vMaxDate)"},

also your variable definition should have the equal sign

example it should be

=DATE(..........)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
shraddha_g
Partner - Master III
Partner - Master III

can you share sample?

MK_QSL
MVP
MVP

Use this for variable...

Date(Max(Date#(Date_Date,'DD/MM/YYYY')))

mohitd910
Creator II
Creator II
Author

It will show total by this way

mohitd910
Creator II
Creator II
Author

when i am using same thing

Date(Max(Date#(Date_Date,'DD/MM/YYYY'))) direct in exp showing correct data. but while using through a variable it showing zero.


vinieme12
Champion III
Champion III

what total would you expect with Max(DATE)?? have you tried yet??

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
tresB
Champion III
Champion III

Try removing the '=' before variable in set expression like:


sum({$<Date_Date={'$(vMaxDate)'},Flag={'ATTENDED DOCTOR REVENUE'}>} SELFPAYER_LC - DISCOUNT + PAYER1_LC)

Anil_Babu_Samineni
MVP
MVP

Mohit,

1) Would you explain where do you create this Variable. I mean by using Variable OverView / Script level

Explanation:

I) If you are using Variable OverView

     Sum({<Date = {'$(vMaxDate)'}>} Outstanding)

For Ref, Ctrl + Alt + V

Then create vMaxDate

And the You need to define this =Date(Max(Date),'DD/MM/YYYY')

II) If Script, You can use this

SET vMaxDate = Date(Max(Date),'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