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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro is failing for invalid character

Hi Guys,

I have written a macro to get the number of rows for a selected date range.

the macro part is given below

checkValue1 =ActiveDocument.Evaluate("count({$<TSR_FROM_DTTM_S_M_INTL={">=$(=Date_From_All) <=$(=Date_To_All)"}>} TSR_FROM_DTTM_S_M_INTL)")

error loading image

Macro is failing saying that invalid character.

But when I put the same expression in text box ,its giving me expected result

I suspect double quotes in between the expression is causing the problem

Can anybody suggest the solution

Thanks in advance

2 Replies
Not applicable
Author

will u share the QVW file. So that can have a check on that

erichshiino
Partner - Master
Partner - Master


The double quotes inside your set analysis caused the problem. It finishes the string. Then, you get an error.

Probably single quotes will make it a comment. So, you can try to use chr(34)

checkValue1 =ActiveDocument.Evaluate("count({$<TSR_FROM_DTTM_S_M_INTL={" & chr(34) & ">=$(=Date_From_All) <=$(=Date_To_All)" & chr(34) & "}>} TSR_FROM_DTTM_S_M_INTL)")

Rgds,