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: 
bnelson111
Creator II
Creator II

Making One Table from Two Tables?

I have a task to make one table box from two tables, i have sums etc all done just now struggling to embed into one, i could do something in charts but just want this to stand alone in the presentation as a table box or a table of its own in the load statement.

current output looks like below.

11.png

I want the 90000 budget to sit on same line as aggr.total(£244,620.00)

Script is below.

[data]:

LOAD date,

month(date)as monthcompleted,

sales

FROM

(ooxml, embedded labels, table is Sheet1);

[Aggr.Table]:

     LOAD

          month(date) AS [date.Name],

          num(Sum(sales),'£#,##0.00') AS [Aggr.Total Data]

     RESIDENT [data]

     WHERE

   //  (Key = 0) AND

     (date >= AddMonths(Today(), -12))

     GROUP BY month(date);    

    

     LOAD * INLINE [

    Budget, date.Name

    90000, Feb

];

Thanks in advance.

1 Solution

Accepted Solutions
sunny_talwar

Overall this:

[data]:

LOAD date,

          month(date)as monthcompleted,

          sales

FROM

(ooxml, embedded labels, table is Sheet1);

[Aggr.Table]:

LOAD Month(date) as [date.Name],

          Num(Sum(sales),'£#,##0.00') as [Aggr.Total Data]

RESIDENT [data]

WHERE

//  (Key = 0) AND

(date >= AddMonths(Today(), -12))

GROUP BY month(date);

LOAD Budget,

          Month(Date#(date.Name, 'MMM')) as date.Name

INLINE [

    Budget, date.Name

    90000, Feb

];

View solution in original post

3 Replies
sunny_talwar

Edit your second Inline table to be this:

LOAD Budget,

          Month(Date#(date.Name, 'MMM')) as date.Name

INLINE [

    Budget, date.Name

    90000, Feb

];

HTH

Best,

Sunny

sunny_talwar

Overall this:

[data]:

LOAD date,

          month(date)as monthcompleted,

          sales

FROM

(ooxml, embedded labels, table is Sheet1);

[Aggr.Table]:

LOAD Month(date) as [date.Name],

          Num(Sum(sales),'£#,##0.00') as [Aggr.Total Data]

RESIDENT [data]

WHERE

//  (Key = 0) AND

(date >= AddMonths(Today(), -12))

GROUP BY month(date);

LOAD Budget,

          Month(Date#(date.Name, 'MMM')) as date.Name

INLINE [

    Budget, date.Name

    90000, Feb

];

bnelson111
Creator II
Creator II
Author

Thanks i see now. cheers