Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am working with a data table. I have started to use straight table and I would like to have a column as minichart.
I am looking at sa´lesamount/month and I would like to make the trend for 3 month.
For example :
SalesObject | SalesAmount 2017-01 | SalesAmount 2017-02 | SalesAmount 2017-03 | MiniChart (Trend) Or Rolling Average |
---|---|---|---|---|
A | 35 | 70 | 119 | ? |
B | 60 | 45 | 130 | |
C | 10 | 40 | 90 | |
D | 18 | 92 | 34 | |
E | 24 | 14 | 46 | |
F | 24 | 155 | 12 |
I have tried the example in QV book but it didn't work. Is there anyone can help me?
/Shirin
Hi Shirin,
have a look at the attached qvw
hope this helps
Did this solve your problem?
If yes, then please close the thread by marking correct and helpful answers!
If not, please let us know the problems you are facing .....
Hello Frank,
Yes. That helps but I put an example. If we don't want to have date like 2017-01 ... in the script , what should we do? Since the month will change. next month , 3 interested month are not the same ...
Im not sure if i understand your requirement correctly but you could write the script as below:
1:
CrossTable(Date, Data)
LOAD *
FROM
[https://community.qlik.com/thread/258555]
(html, codepage is 1252, embedded labels, table is @1, filters(
Remove(Col, Pos(Top, 5))
));
NoConcatenate
Load *,
Subfield(Date,'-',2) as Month,
'2017' as Year
Resident 1; DROP Table 1;
2:
LOAD *
FROM
[https://community.qlik.com/thread/258555]
(html, codepage is 1252, embedded labels, table is @1, filters(
Remove(Col, Pos(Top, 5))
));
hope this helps
No. I don't think so. I mean I want to have date as variable not fixed dates.
So how do your dates look like next month and the month after next month?
Are there always only the last 3 month available, means in may showing 02, 03 and 04 and in june 03, 04 and 05?
or do you have more dates in your datasource, like 01,02,03,04,05....? If this is the case you might need to
use a mastercalender and filter to the last 3 month. have a look at the attached sample.
hope this helps!
It's the first case you mentioned. This month 02,03,04 and next month 03,04 and 05.
Even in that case the above mentioned solution with mastercalendar should work!
Please have a deeper look into it.
hope this helps