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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
mhmmd_srf
Creator II
Creator II

Variable is not woeking in Set Expression

Hi All,

I have a variable v1 =Max(CstDate);

However in set analysis I am trying to use below syntax and it is throwing error:

=sum({<CstDate ={'<=Date('$(v1)','M/D/YYYY')'}>}OrderLineDueCount)

Could anyone please help me on this.

Thanks,

Sarif

5 Replies
pokassov
Specialist
Specialist

Hi

=sum({<CstDate ={"<=$(=Date(v1,'M/D/YYYY'))"}>}OrderLineDueCount)

MK_QSL
MVP
MVP

Or try this

=SUM({<CstDate = {'>=$(=$(v1))'}>}OrderLineDueCount)

Anil_Babu_Samineni

May be typo error

=SUM({<CstDate = {'<=$(=$(v1))'}>}OrderLineDueCount)

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
saimahasan
Partner - Creator III
Partner - Creator III

Try with this. It worked for me

=Count({<CstDate={'<=$(v1)'}>}OrderLineDueCount)

Anonymous
Not applicable

Why you use a variable?

May be try to put directly the max in your set analysis expression?

sum({<CstDate ={$(=Max(CstDate))}>}OrderLineDueCount)