[FileMaker] 如何在報表中按「月份」分類資料?


一開始我的想法很簡單,就是利用一個計算欄位 Caculation Field,將每筆資料的月份列出。(利用Function 函數:Month (date) 來操作)

Month:Month ( date )
Returns a number in the range 1 through 12, representing the number of 
the month of the year in which date occurs.

這樣可以計算出每筆資料資料日期相對應的月份數字,顯示 1-12 的一個月份數字。接著再利用這個計算欄位的值做 Sub-summary(但要記得按此計算欄位 sort 分類)就可以達成目的。


於是 Google 查了一下怎麼解決這個問題,發現有個 FileMaker 網站所提供的方法不錯,在此記錄以便日後參考。 參考網址


DateField (Date)

It is assumed that you already have a file named MonthSum.fp7 that contains the following field:

Given this, add the following calculation field to the file:

MonthSort (Calculation, Number) = 
Year (DateField) & Right ("0" & Month (DateField); 2)
  1. Create a new layout and add to it a Sub-summary part. In the Part Definition dialog choose Sub-Summary when sorted by: and highlight the MonthSort field.
  2. Place the DateField into the Sub-summary part.
  3. Format DateField using the Format Date command in the Format menu or use the Inspector in FileMaker 13. For example, you can make a customer date format that displays the date as “January 2003″
  4. Place any needed Summary fields into the Sub-summary part. These fields will give you a separate subtotal for eachmonth.
  5. Sort by the MonthSort field. Preview or print to see the results.Note: The field “MonthSort" need never to appear on any layout; it is only used to define the sub-summary and sort by





WordPress.com 標誌

您的留言將使用 WordPress.com 帳號。 登出 /  變更 )


您的留言將使用 Facebook 帳號。 登出 /  變更 )

連結到 %s