データポータルでCSVとスプレッドシートから積上げグラフを表示させたい。どうすればよいだろうか?まずはCSVから。
CSVからデータポータル積上げグラフ
シンプルなCSVを用意する。カレー、ラーメン、チャーハン日別で何が売れたのかを記録したデータだ。
![メニューcsv](https://asiastars.org/wp-content/uploads/2021/03/csv.gif)
*左上からデータが入るようにする。スペースを空けてはならない。
*UTF-8で保存する。
用意できたら、データポータルのデータソースに取り込む。
データポータルって何?という方、基本的な使い方はデータワカルで解説している。参考にしてほしい。
![データソース](https://asiastars.org/wp-content/uploads/2021/03/data_source.gif)
コネクタはファイルアップロードを選択
![ファイルアップロード](https://asiastars.org/wp-content/uploads/2021/03/file_upload.gif)
アップロード後、接続、フィールド確認。レポートを作成。
*下記イメージはフィールドの確認
![フィールド確認(メニュー・日付・Record Count)](https://asiastars.org/wp-content/uploads/2021/03/field.gif)
Record Countがここでは重要な役割を果たす。カレーなどの各メニュー別の販売個数を自動で計算してくれる。
まずは「グラフを追加」から「表」を選択。
![テーブル選択](https://asiastars.org/wp-content/uploads/2021/03/select_table.gif)
![メニュー(カレー・チャーハン・ラーメン) record Count](https://asiastars.org/wp-content/uploads/2021/03/table.gif)
表を選択状態にして、積上げグラフに変更
![積上げグラフ選択](https://asiastars.org/wp-content/uploads/2021/03/accumulate.gif)
![積上げグラフ(カレー・チャーハン・ラーメン)](https://asiastars.org/wp-content/uploads/2021/03/accumulated_graph.gif)
積上グラフ設定は以下の通り。
![商品関連データソース・ディメンション・指標各設定](https://asiastars.org/wp-content/uploads/2021/03/settings.gif)
スプレッドシートからデータポータル積上げグラフ
スプレッドシートのサンプルを用意。今回は A・B・C商品別の月次売上データである。
![売上スプレッドシート](https://asiastars.org/wp-content/uploads/2021/03/salses.gif)
*左上からデータが入るようにする。スペースを空けてはならない。
用意できたら、データポータルのデータソースに取り込む。
![データソース2](https://asiastars.org/wp-content/uploads/2021/03/data_source.gif)
コネクタはGoogleスプレッドシートを選択
![Google スプレッドシート](https://asiastars.org/wp-content/uploads/2021/03/spreadsheet.gif)
アップロード後、接続、フィールド確認。レポートを作成。
*下記イメージはフィールドの確認
![フィールド確認(A・B・C・日付・Record Count)](https://asiastars.org/wp-content/uploads/2021/03/field_sp.gif)
まずは「グラフを追加」から「表」を選択。
*Record Countの出番はここではない。
*必要なデータはスプレッドシートの売上表に存在している。
![テーブル選択2](https://asiastars.org/wp-content/uploads/2021/03/select_table-1.gif)
![売上(A・B・C) 計](https://asiastars.org/wp-content/uploads/2021/03/salse_table.gif)
表を選択状態にして、積上げグラフに変更
![積上げグラフ選択2](https://asiastars.org/wp-content/uploads/2021/03/accumulate.gif)
![積上げグラフ(A・B・C)](https://asiastars.org/wp-content/uploads/2021/03/accumulated_sales-1024x420.gif)
積上グラフ設定は以下の通り。
![売上関連データソース・ディメンション・指標各設定](https://asiastars.org/wp-content/uploads/2021/03/salse_setting.gif)
以上である。