Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Data from different tables into one Line chart

Hi,

i have two tables

LOAD SaleDate,

   Sales ;

SQL SELECT Date,

   Sales

FROM Sales;

LOAD MarketingDate,

   MarketAmount ;

SQL SELECT MarketingDate,

   MarketAmount

FROM Marketing;

ImageSale.PNG

i need to display both datas in line chart for Each day without repeating dates, for last 6 months. How could i do this?

7 Replies
Highlighted
Partner
Partner

Re: Data from different tables into one Line chart

Link those 2 tables with dates.

LOAD SaleDate as CalendarDate,

   Sales ;

SQL SELECT Date,

   Sales

FROM Sales;

LOAD MarketingDate as CalendarDate,

   MarketAmount ;

SQL SELECT MarketingDate,

   MarketAmount

FROM Marketing;

and then plot graph

Dimension:- Month(CalendarDate)

Measure 1 :- sum(Sales)

Measure2:- sum(MarketAmount)

Highlighted
Creator II
Creator II

Re: Data from different tables into one Line chart

Hi ,

Thanks for reply!

But i need to display for last 6 months that is OCT 2016 to Feb 2017, showing dates in x axis.

Highlighted
Partner
Partner

Re: Data from different tables into one Line chart

Use in Set analysis,

sum({<CalendarDate = {"">=$(=date(addmonths(max(CalendarDate),-6)))}>}MarketAmount)

sum({<CalendarDate = {"">=$(=date(addmonths(max(CalendarDate),-6)))}>}Sales)

In Add Ons section

Uncheck Show Zero Values Property

Highlighted
Creator II
Creator II

Re: Data from different tables into one Line chart

Hi Shradda,

Yes, i got what i wanted. But i have a questions here

Instead of Month as a dimension, if i use Dates it shows multiple values for same dates. How could i achieve to get only one value for particular dates without repeatation of Dates?.

Highlighted
Creator II
Creator II

Re: Data from different tables into one Line chart

Hi

Highlighted
Creator II
Creator II

Re: Data from different tables into one Line chart

Hi,

Yes, i have done it. But date gets repeated. Beacuse i sales table, there is multiple values for same date. So combining these two table results in Multiple data.

Please find below attached qvf file,

Highlighted
Creator II
Creator II

Re: Data from different tables into one Line chart

Hi