差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版 前次修改
tech:google_spreadsheets_tips [2021/07/20 19:09] jonathantech:google_spreadsheets_tips [2021/12/21 08:57] (目前版本) – [原始資料彙整與排序] jonathan
行 35: 行 35:
   * 範例檔案 - https://docs.google.com/spreadsheets/d/1VeSoR9muNzVQy8eqSJsvvdwc_wgZh1zarl3JiaawE_o/edit?usp=sharing   * 範例檔案 - https://docs.google.com/spreadsheets/d/1VeSoR9muNzVQy8eqSJsvvdwc_wgZh1zarl3JiaawE_o/edit?usp=sharing
  
 +===== 使用 Query 來篩選彙整資料表內的資料 =====
 +  * 參考 - https://developers.google.com/chart/interactive/docs/querylanguage
 +  * Exp. 假設有一個來源分頁紀錄原始資料, 希望可以針對特定欄位進行加總排序產生彙整後的資料
 +  * <cli>
 +=query('(DB)專案資訊'!A3:EK, "
 +select A , B, M, sum(O), sum(P), sum(Q), sum(R) 
 +where (M!='' and M!='#N/A'
 +group by M, A, B 
 +order by A, B, M 
 +label A '部門', B '中心', M '六碼', sum(O) 'T.建立', sum(P) 'T.更新', sum(Q) 'T.Git', sum(R) 'T.Pipe'
 +", -1)
 +</cli>
  
  
 {{tag>GoogleDocs Spreadsheets 試算表 tips}} {{tag>GoogleDocs Spreadsheets 試算表 tips}}
  
  • tech/google_spreadsheets_tips.txt
  • 上一次變更: 2021/12/21 08:57
  • jonathan