Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Concatenation for Measures in Direct query for Postgresql

Hi All,

As per heading of the discussion, I want to concatenate string values in two different columns of Measures in Direct Query.

How Can I achieve the same.

I am using Postgresql.

I am using -

DIRECT QUERY

DIMENSION

  1 As Flag

MEASURE

  col1,

  col2,

  col3

From demo;

And I want something like -

DIRECT QUERY

DIMENSION

  1 As Flag

MEASURE

  col1,

  col2 || col3 as test

From demo;

Please assist.

Thanks & Regards,

MK

1 Solution

Accepted Solutions
sunny_talwar

I see no documentation where it says that you cannot use NATIVE in Measures. But there is no way for me to test this because I don't have access to Direct Discovery application. But just so we are sure, did you add single quotes around your function?

NATIVE( 'col2 || col3' ) as test

View solution in original post

15 Replies
adamdavi3s
Master
Master

Can you preceeding load a direct query?


Load *,col2 & col3 as test;

DIRECT QUERY

DIMENSION

  1 As Flag

MEASURE

  col1,

  col2,

  col3

From demo;



Anonymous
Not applicable
Author

I tried this, it says, col2 not found, throws an error.

adamdavi3s
Master
Master

sack off the direct query and just use normal SQL?

I never really understood the benefit of direct query myself

Anonymous
Not applicable
Author

anyone please assist

adamdavi3s
Master
Master

Sorry I was being serious, I don't think you can expect to achieve this using DIRECT Query as it doesn't give you this kind of flexibility

Anonymous
Not applicable
Author

I have to use Direct Discovery approach only

sunny_talwar

Can you try this:

DIRECT QUERY

DIMENSION

  1 As Flag

MEASURE

  col1,

  NATIVE(col2 || col3) as test

From demo;

sunny_talwar

Here are some example of how NATIVE is used. It basically allows you to do SQL manipulations to the Direct Discovery

What is QlikView Direct Discovery – Learn QlikView

sunny_talwar

Forgot to add single quotes....

DIRECT QUERY

DIMENSION

  1 As Flag

MEASURE

  col1,

  NATIVE( 'col2 || col3' ) as test

From demo;