Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic table loading and data-binding?

Let's say I have a sql stored procedure that can return me a dataset with a variable number of columns:

  1. Is there a way to load it into the model?
  2. How can I bind its data to a Straight Table or Pivot Table?

Any suggestions?

-ed

4 Replies
Miguel_Angel_Baeyens

Hi Ed,

In regards to your first question, you do can execute a stored procedure and load its results into QlikView:

Table:

LOAD *;

SQL EXEC sp_procname;

What do you mean by "bid it to a straight table"? Once you have the fields loaded into QlikView you can create a chart straight table, and use these fields in the Dimensions and Expressions tabs of the chart properties.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Thanks for the help Miguel, #2 was more like, "How can I build a chart straight table with a dynamic number of columns", since the datasource can have X number of columns, my chart would have to reflect it.

Do you know a way to append columns dynamically?

Thanks again for you time.

-ed

Miguel_Angel_Baeyens

Ed,

You can actually build a table from the scratch using the QlikView API and a macro triggered from a button or a textbox. However, I don't recommend you to do that if possible, and instead, create a pivot table where the expressions and dimensions can be moved to a horizontal position if needed, so if you dimension increases, so your chart will do. Anyway, without more details on your requirements, expected output and datamodel is hard to say.

Regards.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Thanks again Miguel, about the requirement, I also have little information, mostly is that, can I create a Straight table and add columns to it, depending on the number of columns that the stored proc returned?

I have read a lot here in the forum, but all negative answers, I wanted to ask it myself, but since you mentioned a macro, I was told nto to use them, so basically I ended were I started, do you agree?

-ed