Why must be Tableau for create the best report dashboard for BI?





If you ever tried powerbi I would like to suggestion you try to use tableau some then you may change your mind to pick up tableau instead BI tools as you are using now.

Why I have said that? YES PowerBI that very simple and easy, it's good for the end of user to build some simple dashboard and tableau also have best quality as powerbi but the one of main thing of tableau is got my heart cause it's very fast while you are running report.

If you have any question or problem of tableau and powerbi, ETL I would like to help you for this scope of your job. I a consultant of tableau and powerbi also including ETL as well.

Welcome to my page.

Robot Framework RIDE ติดตั้ง เริ่มเขียน - For Beginner

Robot Framework คืออะไร
เอาสั้นๆง่ายๆ คือโปรแกรมเอาไว้เขียนให้ระบบมันทำงานของตัวมันเอง ไม่ต้องไปทำซ้ำๆ เช่น เอาไว้แก้ Bug เวลาทำเว็บหรือระบบอะไรก็แล้วแต่ เริ่มกันเลย อย่ามัวเสียเวลา

การติดตั้ง ขอบอกว่าโคตรเยอะ จะมีปุ่มให้คลิกทีเดียวแล้วติดตั้งให้หมดเลยไม่ได้ ต้องมาติดตั้งทีละตัว และการ Download มาแต่ละโปรแกรมก็แสนจะเยอะ เจ้เลยรวมทุกอย่างไว้ที่นี่ ที่เดียวจบปะ

1. จง Download โปรแกรมดังต่อไปนี้ (คือ download มาให้ครบทีเดียวจะได้ไม่งง หรือใครจะงงก็ว่าไป)
     1.1 Python 2.7.x ไปที่ 
            https://www.python.org
     1.2 wxPython2.8-win64-unicode-2.8.12.1-py27 
          ไปที่ https://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/
     1.3 Chrome Driver ไปที่
          
https://chromedriver.storage.googleapis.com/index.html?path=2.37/
           ตัวนี้ไม่ต้องก็ได้ หากใครไม่ได้ Test Script ผ่านทาง Browser

2. ลง Python ดับเบิ้ลคลิกที่ exe เลือกไปไว้ที่ C:\ หลังจากนั้นคลิก next อย่างเดียวหลังจากเปลี่ยน path ที่จะลงแล้ว

3. ไปที่ windows พิมพ์ cmd เพื่อเปิด command line (คงไม่ต้องบอกนะว่าอยู่ที่ไหน ถ้าหาไม่เจอก็ตรงซ้ายมือเมนูที่เราจะคลิกเข้าโปรแกรมนั้นแหล่ะ มีรูปแว่นขยายอยู่ หรือถ้า Windows เก่าหน่อยก็จะเป็นช่องให้ค้นหา พิมพ์เข้าไปเลย cmd แล้วกด enter)


4. จากนั้นให้พร้อมไปที่ Folder ที่เราเพิ่งลง Python ไปตามภาพ
5. ติดตั้งเครื่องมืือดังต่อไปนี้ ไม่ต้องถามว่ามันคืออะไร เพราะเจ้เองก็ไม่รู้อิๆ หลักง่ายๆคือ copy คำสั่งแล้วว่างที่ Command line หลัง C:\Python27> นะจ้ะ ขอย้ำว่าทุกคำสั่ง เพราะเจ้รวบรัดตัดตอน แต่ถ้าใครชอบแบบมีคำอธิบายเยอะ ลองคลิกเข้าไปที่นี่ คำเตือน ฝรั่งล้วนๆนะ แต่พอเดาได้
https://www.swtestacademy.com/getting-started-robotframework/

pip install robotframework กด Enter
python -m pip install -U pip กด Enter
robot --version กด Enter
rebot --version กด Enter


pip install --upgrade robotframework  กด Enter
pip install robotframework==2.9.2  กด Enter

ทำทีละคำสั่งหละ มันมีให้ กด Enter คั้นอยู่นะ


** ถ้า command line มันยาว ก็ปิดแล้วเข้าใหม่ ก็ทำต่อขั้นตอนถัดไปได้นะคะ

และจากนั้นให้ลง wxPython แล้วทำดังนี้ กด Next ดังภาพอย่างเดียว



ลงต่อหลังจากลง wxPython เสร็จ ยังทำที่ command line อยู่นะ ถ้าหลุดให้เข้าไปใหม่

pip install robotframework-ride   กด Enter
pip install robotframework-selenium2library    กด Enter
pip install --upgrade robotframework-selenium2library    กด Enter

pip install robotframework-selenium2library==1.4.1    กด Enter
pip install --upgrade selenium    กด Enter
pip install selenium==2.34    กด Enter

6. สุดท้ายละ ให้ลองพิมพ์คำว่า ride.py ใน command line แล้ว enter จะมีหน้าจอแสดงให้เราเขียนโค้ดแบบเก๋ๆดังภาพคะ

ทีนี้ก็โซโล่กันเลย ครั้งหน้าจะมาสอนการเปิด Browser แล้ว login เข้า facebook โดยใช้ Robot Framework หรือถ้าใครรอไม่ไหวเข้าไปที่นี่คะ
https://youtu.be/cmwCi1TGPC4




SSIS ตัวแปรวันที่ปัจจุบัน date_now

การสร้างตัวแปรวันที่เพื่อกำหนดขอบเขตในการดึงข้อมูล


สร้างตัวแปรดังนี้
date_start
(ตัวแปรหลักวันเริ่มต้น หากไม่ได้ใส่ค่าอะไร ตัวแปรนี้จะดึงค่ามาจากตัวแปร fix_date_start)

fix_date_start 
(ตัวแปรวันที่เริ่มต้น Default ไว้)

date_end 
(ตัวแปรหลักวันสิ้นสุด หากไม่ได้ใส่ค่าอะไร ตัวแปรนี้จะดึงค่ามาจากตัวแปร fix_date_end)

fix_date_end 
(ตัวแปรวันที่สิ้นสุด Default ไว้)

จากนั้นใส่ Function เพื่อกำหนดค่าให้วันที่เริ่มต้น
@[User::date_start] =="" ? (DT_STR, 4, 1252) DATEPART("yy" ,DATEADD("dd",-1,GETDATE()))+ "-01"
+ "-01":@[User::fix_date_start]


จากนั้นใส่ Function เพื่อกำหนดค่าให้วันที่สิ้นสุด
@[User::date_end] =="" ?
 (DT_STR, 4, 1252) DATEPART("yy" ,DATEADD("dd",-1,GETDATE()))+"-"+(DT_STR, 4, 1252) DATEPART("mm" ,DATEADD("dd",-1,GETDATE()))
+"-"+(DT_STR, 4, 1252) DATEPART("dd" ,DATEADD("dd",-1,GETDATE())):@[User::fix_date_end]

ปล.
เวลาเรียกใช้ ให้เรียกใช้ตัวแปรชื่อ date_start, date_end

How to change URL or Folder in WordPress

Why can not just change folder name of website in Wordpress but it did't work


If you not programmer you can search this keyword on google and follow them step "wordpress change page url"

but if you are any expert, I hope just look at this image then you will can get it how to do. Just change to name of myurl to the new domain name or new folder as you want.

good luck.


My knowledge will be here forever



Have you ever forgot some function name of program or some step to do some thing? ME! often ^_^ and The way I have tried to searching on google, sometime it fast and easy to get some answer but some time I have take long time to get some solution.

And if I have to asked some one in my office, some time they help and some time they were busy, I do not want to disturb them often and some of them were really help me but some of them were not happy when I asked them often and often T_T, YES! I understand that my brain have limited for memory and an other one may upset when they have to answer same question again and again then I have the way for me to help to remember and keep all knowledge as I ever had and will have in the future in here ^__^, If you afraid of your recognize, This way can help you. Happy and Enjoin!.

PHP Send Mail with Attached File






$filename_localfile="myfile.csv";
$mailContent="My content";
$mail_boundary = md5(uniqid(time()));
$mailSubject="My subject will appear on mail title";

$mail_headers .= "MIME-Version: 1.0\r\n";
$mail_headers .= "Content-type: multipart/mixed;boundary=\"$mail_boundary \"";
$mail_headers .= "\r\n\r\n";
$mail_headers .= "This is a multi-part message in MIME format.";
$mail_headers .= "From:soly K <mymail@gmail.com>\r\n";

$mail_headers .= "\r\n\r\n";
$fp = fopen($filename_localfile, "r");
$file = fread($fp, filesize($filename_localfile));

$file = chunk_split(base64_encode($file));

$mail_body = "--$mail_boundary\n";
$mail_body .= "Content-type: text/plain; charset=euc-kr\r\n";
$mail_body .= "Content-transfer-encoding: 8bit\r\n\r\n";
$mail_body .= $mailContent."\r\n";
$mail_body .= "--$mail_boundary\r\n";
$filename = basename($filename_localfile);

$mail_body .= "Content-type: application/msword; name=$filename\r\n";
$mail_body .= "Content-transfer-encoding:base64\r\n\r\n";
$mail_body .= $file. "\r\n\r\n";

$mail_body .= " --$mail_boundary--";

mail("tomailsomeone@gmail.com",$mailSubject, $mail_body, $mail_headers);

Import Data from Excel to Create Dashboard on QlikView - 2


Import Data from Excel for create dashboard in QlikView





You can import data from excel to QlikView on dashboard and I can say that it's such a very simple, However this way it was not flexible for user to flush data to keep present every time but it's simple way to create dashboard for short terms.

OKEY!
Let's see my VDO
https://youtu.be/iamSi7H_AO0



Create Table Data for Dashboard by QlikView - 1

How to use QlikView in the first time to create simple dashboard?



HELLO!
How are you? How is your life there? How is the weather? in Thailand it's very so hot, that can melt me, however I hope you enjoin life for this summer time.

For this season I would present you how to create table data on dashboard by QlikView (If you do not know about QlikView you can click on this link http://www.mymemoboxs.com/2015/04/what-is-qlikview-product.html)

And for good news, I have recorded VDO how to for all of you too, but for the sound that so sorry, You have to imagine how is your voice look like ^__^

OKEY! Enjoin VDO
https://youtu.be/4JQ9q9oQy2M


SQL Server Create Table


How to create table in SQL Server that very simple for the beginner.




Note!
Please do not create the 
same  name of Table in View Module of SQL Server Database

CREATE TABLE [dbo].[DATABASE_TABLE1](
[T_YEAR] [varchar](50) NULL,
[T_MONTH] [varchar](50) NULL,
[T_ACCOUNT] [varchar](50) NULL,
[T_NAME] [varchar](50) NULL,
[T_LASTNAME] [varchar](50) NULL,
[T_SALARY] [decimal](18, 2) NULL
) ON [PRIMARY]

Create command as details as above then click on "Execute"
or You can follow methods as image below

STEP-1Create command to create table





STEP-2After click on "Execute" then click right on database for refresh, you will see the table have created




STEP-3Click right at table then select design menu



STEP-4
You will see the structure of table as image below



STEP-5
Set Primary Key by click right on that field



Primary Key have created


SQL Select change column to row

How to change column from table to row?




Example data from table1

id name lastname month1 month2 month3
1 name1 lastname1 300 400 500
2 name2 lastname2 10 20 30


Code :

SELECT id,name,lastname,amount,month
FROM (
SELECT id,name,lastname, month1 as amount, '1' as month FROM table1 as t1
UNION ALL
SELECT id,name,lastname,month2 as amount, '2' as month FROM table1 as t2
UNION ALL
SELECT id,name,lastname,month3 as amount, '3' as month FROM table1 as t3
)


Result :
id name lastname amount month
1 name1 lastname1 300 1
1 name1 lastname1 400 2
1 name1 lastname1 500 3
2 name2 lastname2 10 1
2 name2 lastname2 20 2
2 name2 lastname2 30 3

What is QlikView Product?

What is QlikView? Is it good for Business Intelligence?




I fail in love with QlikView immediately after I have tried to used it for the first time, If you are a developer of BI tools, You may know or do not know about this product, but let's me tell you some thing how is QlikView cool?

WHAT IS IT?
QlinkView is the one product (from Sweden) to create Business Intelligent concept to generate report, the dimension of report that you want to see and process, in basically of general report you will see only 2 dimension of data but if you use BI concept, you can answer and question of your boss when he/her would like to know some information of data in different view in 2 minutes.

HOW IS GOOD in QlikView ?
- Very simple and easy to create report
- Support every database type by use connecting driver
- Fast and Smooth
- Write in memory concept that why it make QlikView process report very fast
- You can create What's if as you want
- Available import google map to create bubble

You can download and use it by link before, it's free and can use any feature like license product but the different thing is you can not run report in any other computer, except the computer you have installed QlinkView
http://www.qlik.com/

Jquery DatePicker Show Full Month Name and Year





Result




Jquery Code


$("#dateStart").datepicker({

changeMonth: true,
changeYear: true,
showButtonPanel: true,
dateFormat: 'MM yy',
onClose: function(dateText, inst)
{
    var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
    var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
    $(this).datepicker('setDate', new Date(year, month, 1));
}

});

Godaddy I am angry you! T_T

WHAT HAPPEN WITH GODADDY?


Somebody can help me? please I spent almost one week to fixed the problem how to connect the database.

Let's me tell you about bad mood with godaddy.com, Yes I am the one customer of them for many years ago, I loved godaddy features, They have many features for you to selection to matching with your business and needs, It was very simple and easy to config.

I buy many domain name from godaddy and I also paid for hosting because it was stable and simple for me to config but now every things seem harder then before.

1. I do not understand why godaddy not set www to be default to transfer files ( After I transfer files to godaddy I could not laugh my website immediately)

2. After I created database and connected to database by use PHP script, until now I still do not know what is wrong? The script said I could connect to server but database could not, I have checked username, password, database name, every things look find but T_T why I still cannot connect to my database.

This is a very simple script to connect database

$hostname = "localhost";
$username = "username";
$password = "password";
$dbname = "databasename";

mysql_connect($hostname,$username, $password) or die("Can not connect to server");
mysql_select_db($dbname);

mysql_query("SELECT * FROM mytable");

BUT you do not allow me to get in WHY? I'm sad

3.Godaddy help support is not convenient, They put all solutions in blog and the customer have to search there but some of my problem were different from them and I have to spent a lot of time to searching, They have only calling number, before I just open my problem and they solved the problem for me very fast but now so different.

4.I'm not happy for godaddy help center, it was not help and one more thing I just wonder why godaddy seem slow more then before, I spent a half of day to transfer my files (only 22.MB) to server Or it because I living far away from you? Yes you live in USA for me I live in Thailand or this is the reason why you do not care about me? T_T

5.And for user interface to set up, it seem too slow when I click on some link and page, I had count how much time it take 1 2 3 4 5 6 7 8 9....20 some page almost to 30 OH! my god, I would like to change to use an other hosting.

6.Any one have bad experience like me with godaddy?

SORRY to talk about you godaddy but seem like you have developing in wrong way...the way you were before was nice that why I return to use your products.

I hope you will help me and improve your products, This is the way I can connect you because you close every way for customer to contract you in direct.

Reporting Service Configuration to Sending Mail


The photo is not match about the story I will talking about today, I knew that but I just want all of you to be happy and smile ^_^ and I likes her hips even I am a girl and straight.

OKEY! today I would like present how to configuration mail on SQL Reporting Service to sending mail to any concerns.

STEP-1
Go to "SQL Server Reporting Service Configuration Manager"




STEP-2
You will the popup as image below, This details in window it for configuration of SQL Reporting Service Only






STEP-3Then you have to fill mail server detail as image below






What is TM1 Cognos? What is good and bad side?



TM1 is the one product of IBM, The full name of TM1 is Table Manager One, Yes the concept of TM1 is keep all data on memory, Build cube, Build dimension that very easy and it create for supporting financial and budgeting planning.

For the concept to keep all data in memory, that helpful, you do not need to process cube if you want generate any report, very simple and fast then other product, They said ^_^.

There are many ways to enter to TM1 for many reason
1.TM1 Architect 
This work space is comfortable for programming, and some super user to get inside for key in data, budget, you can create cube, dimension, create formula, codding in this product.

2.TM1 Perspective
It still look the same like TM1 Architect but the only one is different it because you can export your job from here to excel or slice your job to excel with formula then you can work on excel, if you selected to slice that mean every formula will export to excel also, whatever you have change from excel, it'll make effect to TM1 Architect automatically, So why IBM have to create this product?.

3.TM1 Application
It's a web application and it the way to get inside to project. You can create work flow on this product but you can not create cube or build any dimension on here, user also can key in data on this space.

4.TM1 Web
I'm still not sure why they need to separate this section from TM1 application product because every thing seem like the same, but the different one is you can not create work flow on here, that it's!?

5.TM1 Insight
Yes if you want to work in off line, you have to install TM1 insight on your computer but that not helpful, U can not sick your job to server after you have done automatic, it need special way to do, every thing feel the same TM1 application, but you just can create or import cube and dimension from here then I still not get why IBM have to create many window to inside work space that too trouble.


Let's see compare between TM1 and SQL Server Analysis Service
List TM1 SQL server analysis services
Brand IBM Microsoft
Build Cube Yes Yes
Process Cube No Yes
Make data relation table Yes Yes
User Friendly Poor Nice
Programmer Friendly Poor Nice
In memory Yes No
Fast Depend on data Depend on data
Database No SQL Server
Work Flow Yes No
Off Line Mode Yes No
Recouse Height Speed Heidht Speed

SSIS Parameters in Different Type of Data in Package

How can I image that parameters in SSIS that quite different when you have to use it in different type of data flow. Yes I know that at first we have to create parameters in same level but when you have to select data by use different type of database you have to change the syntax for query, OKEY! let's see what is different.

Set Parameter for Execute SQL Task Step 1
STEP-1
You have to create parameters as below by click on menu  SSIS -> "Variables"






STEP-2
Define parameters as you want for example, year, month etc..





STEP-3
After you created and define all parameters as you want you have to set parameter for "Execute SQL Task", you have to set type of parameter as your data config on table of database


STEP-4
Then click on query of Task and you have to replace the value of parameter by use =? instead


STEP-5
But if you have to put parameter on "ADO Net Source" object, you have to replace it by =@parameter_name



Set Parameter for Execute SQL Task Step 2
STEP-6
Any if you have to use "Execute SQL Task" in same package and need to set parameter, you have to add parameter in that task again


STEP-7
After you set parameter on this step, you have to replace parameter by use "=?" in "Execute SQL Task" it the same as step 1


STEP-8
To use parameter for query on OLE DB you have to click on "Parameters" button on the right page of window popup


STEP-9
And now you have to replace parameter on OLE DB for query data from SQL Server as
"=?"


STEP-10
It's perfect your job package will look like this image, click on "Start" for running package





Notice :
Define parameter for a package you have to set it just one time but for use parameter in different type of object, you have to replace in different symbol.

Import File System to SQL Integration Service Catalogs for SQL Sever Agenda



Before you will set schedule on SQL Server Agent, you have to import file package from SSIS to Integration Service first. OKEY! it's time to go.

STEP-1
Go to  SQL Server Studio 2014 -> Server type : Integration Services -> fill "Server Name or IP" Server


STEP-2
Click on "Store Package" you can create new folder by click right and "New Folder" for collect your project jobs




STEP-3
After you created folder to keep your package, you have to import package from SSIS to folder by click right on folder you have just created then select "Import Package"




STEP-4
Select package as your job path then click on "OK" to finished





Next Step to create job schedule on SQL Server Agent
http://www.mymemoboxs.com/2015/02/create-agenda-on-sql-server-agent-for.html

Notice :
If you changed any thing on your SSIS package, you have to reimport that package again, otherwise after you create job schedule and click on run, you may see many error.

GOOD LUCK 




Create Agenda on SQL Server Agent for Run Script on SSIS


After you create all SSIS to transfer data from any platform to SQL server, now you have to set up schedule for run script as automatic by use SQL Server Agent .

At first you have to import your package to Integration Services as details here
http://www.mymemoboxs.com/2015/02/import-file-system-to-sql-integration.html

STEP-1
Open SQL Server, click on right "Jobs" at SQL Server Agent then hit on "New Job"



STEP-2
Dialogue will appear as image blow, you have to set the on "General" section
Name : "Run Company Profile" or any name as you wanted
Owner : select administrator permission by click on browse
Category : pick up on "Data collector"






STEP-3

To select source file click on "Steps"
Step name : set the process name as you wanted
Type : select SQL Server Integration Service Package
Run as : SQL Server Agent Service Account will automatic set
Package sourve : SSIS Package Store
Server : localhost or IP Server
Package : Browse for your package job



STEP-4
Click on "Execution Options" and click on "Use 32 runtime" then click Ok to finished create source package






STEP-5

To set the time to running script project by click on "Schedules" on the left menu



STEP-6To run process, click right on job schedule and select "Start job as Step"