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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
christophebrault
Specialist
Specialist

Expression in Variable

Hi,

I'm using variable to store expression, but it's not working for a specific one :

LET vSommeCA = 'sum({$<DateFacture={">=$(=Min(Date))<=$(=Max(Date))"}>}FACT_LIGNE.CAHT)';

Any idea ?

Thanks

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin
11 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this.

     SET vSommeCA = '=sum({$<DateFacture={">=$(=Min(Date))<=$(=Max(Date))"}>}FACT_LIGNE.CAHT)';

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
kuba_michalik
Partner - Specialist
Partner - Specialist

Had a look at your script, and the problem was what I thought it would be.

Try this for assignment in script:

SET vSommeCA = 'sum({$<DateFacture={">=$^^(=Min(Date))<=$^^(=Max(Date))"}>}FACT_LIGNE.CAHT)';
LET vSommeCA = Replace('$(vSommeCA)','^^','');

Then it works (use $(vSommeCA) in any expressions, otherwise QlikView will treat the variable as text.)