Home > Database > Mysql Tutorial > QlikView图表显示同比数据

QlikView图表显示同比数据

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:01:25
Original
1479 people have browsed it

数据准备如下: SalesData:LOADNum(ID) as ID,Date(Date) as Date,Month,Num(Year) as Year,Num(Sales) as SalesInline [ID, Date, Month, Year, Sales1, 2012-1-1, 1, 2012, 202, 2012-1-1, 2, 2012, 213, 2012-1-1, 3, 2012, 234, 2013-1-1, 1, 2013, 345,

数据准备如下:

SalesData:
LOAD
	Num(ID) as ID,
	Date(Date) as Date,
	Month,
	Num(Year) as Year,
	Num(Sales) as Sales
Inline [
ID, Date, Month, Year, Sales
1, 2012-1-1, 1, 2012, 20
2, 2012-1-1, 2, 2012, 21
3, 2012-1-1, 3, 2012, 23
4, 2013-1-1, 1, 2013, 34
5, 2013-2-1, 2, 2013, 35
6, 2013-3-1, 3, 2013, 46
7, 2014-1-1, 1, 2014, 27
8, 2014-2-1, 2, 2014, 30
9, 2014-3-1, 3, 2014, 49
];
Copy after login

新建线形图表命名为Sales,如图所示,

\

将Month作为维度,如图所示:

\

在表达式那个tab中新建两个Expression 如下所示:

\

ActualSales的表达式如下:

=Sum({$<
	Year={&#39;$(=Max(Year))&#39;}
>}Sales)
Copy after login


PCPSales的表达式如下:

=Sum({$<
	Year={&#39;$(=Max(Year)-1)&#39;}
>}Sales)
Copy after login

点击确定,生成如下图表:

\

如有疑问,欢迎留言交流。

最近还会再写的几个Topic::

1. 显示所选时间前12个月销售数据;

2. 显示上一销售级别的销售;

3. 计算最近一年的销售数据。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template