Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to handle single quotes in Inline Load

I've searched all over the community and have tried different tactics but I can't get this one to work.  The simple inline table below, it's failing due to the single quotes in the "F2" field.  I need those single quotes though.  I've tried different combo's of using double quotes, single quotes, chr(39), [] ... can't figure this out.  I know it's possible.  Can somebody help?  Thanks for anything

Example:

LOAD * INLINE [

    F1, F2

    Actuals, sum({$<[Source Name]
= {'Current View'}>}[Outlook Units])

];

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You can enclose field names in [ ], ` `, ´ ´ and " " pairs. So try it like this:

LOAD * INLINE [

    F1, F2

    Actuals, sum({$<"Source Name" = {'Current View'}>}"Outlook Units")

];

Or if you have no double quotes in your expressions try:

LOAD * INLINE "

    F1, F2

    Actuals, sum({$<[Source Name] = {'Current View'}>}[Outlook Units])

";


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
Not applicable
Author

Hi Dc,

I think inline load will not support expresions like this

sum({$<[Source Name] = {'Current View'}>}[Outlook Units])

you used setanalysis here. it will support like date(today(),'MMM YY') but here you were using filter condition.

Regards,

Chandra

sivarajs
Specialist II
Specialist II

I guess because of square bracket([) in expression creating error because we usually end inline table with ]

So remove that and try

LOAD * INLINE [

    F1, F2

    Actuals, sum({$<Source Name = {'Current View'}>}Outlook Units)

];

Gysbert_Wassenaar

You can enclose field names in [ ], ` `, ´ ´ and " " pairs. So try it like this:

LOAD * INLINE [

    F1, F2

    Actuals, sum({$<"Source Name" = {'Current View'}>}"Outlook Units")

];

Or if you have no double quotes in your expressions try:

LOAD * INLINE "

    F1, F2

    Actuals, sum({$<[Source Name] = {'Current View'}>}[Outlook Units])

";


talk is cheap, supply exceeds demand
MayilVahanan

HI

Change the Source Name as SourceName or Source_Name and for OutlookUnits. You can give label as Source Name as in front end.

Then

LOAD * INLINE [

    F1, F2

    Actuals, sum({$<SourceName
= {'Current View'}>}OutlookUnits)

];

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thank all of you for your quick responses, all of you had different solutions to fix the problem but for me Gysberts explanation and solution was the most effecient.  I learned a lot about characters ([ ],",') and how Qlikview handles them with this question which will help me in different areas.

Thanks again

Not applicable
Author

I wish I would have asked this in my original post.  Now that I have my inline table filled out I am attempting
to use it in my pivot table for dynamic sorting of my expressions.  So for example if they select F1 of "Actuals"
my set analysis value of sum({$<[Source Name] = {'Current View'}>}[Outlook Units]) would be executed and expressions
dynamically sorted.  It's a cool trick I use for sorting pivot tables, I usually use buttons with variables but
in this case I have so many it would look nicer if I allowed the users to select F1 values using a list box.

So my second question is:

How do I force Qlikview to actually execute the value of F2 in the pivot table vs the literal text?  For variables
the $() is used but it looks like this doesn't work for table values?  Any suggestions?

Thanks again

jeffmartins
Partner - Creator II
Partner - Creator II

Hi dcbonnet,

The expressions in fields can be evaluated using a variable, but it´s possible to use several expressions in field creating a variable with all expressions.

See the following link and the attached file for more detail.  http://community.qlik.com/thread/67420

Regards