日付 #TSV: 四半期集計

日付 #TSV: 四半期集計

translate Date #TSV: Group by Quarter

日付TSV内の行数を四半期ごとにカウントし、2列のTSV(”Q-202604~06″,”3″)として出力します。数値列(例:本体価格, 消費税額)を含む場合、その数値を四半期合計(”Q-202604~06″,”3″,”12000″,”1200″)することも可能です。なお、Date 列の場所はA列(id=0)に限らず、任意の列位置を指定できます。また Datetime フォーマットになっていても構いません。

Auto Step icon
Configs for this Auto Step
StrConfA
A: 入力TSV文字列(日付列を含むTSV)をセットしてください *#{EL}
StrConfB1
B1: 日付列のIDをセットしてください(A列は”0″、B列は”1″) *#{EL}
StrConfB2
B2: 合計する数値列のIDをセットしてください(例: “1,2,4”)#{EL}
SelectConfC1
C1: カウント行数の出力形式 *
StrConfC2
C2: FY方式に変更したい場合、決算月をセットしてください(例: “3”; Q-202604~06 → FY2027-Q1)#{EL}
SelectConfC3
C3: アウトプットTSVが格納される複数行文字列型データを選択してください (更新) *
SelectConfD1
D1: 入力TSV行数を格納する数値型データを選択してください (更新)
SelectConfD2
D2: 入力TSV行数(空行を無視)を格納する数値型データを選択してください (更新)
SelectConfD3
D3: 出力TSV行数を格納する数値型データを選択してください (更新)
Script (click to open)
// Script Example of Business Process Automation
// for 'engine type: 3' ("GraalJS standard mode")
// cf. 'engine type: 2' ("GraalJS Nashorn compatible mode") (renamed from "GraalJS" at 20230526)


//////// START "main()" /////////////////////////////////////////////////////////////////
main();
function main(){ 

//// == Config Retrieving / 工程コンフィグの参照 ==
const strTsv         = configs.get        ( "StrConfA" );     // REQUIRED
  if( strTsv === "" ){
    throw new Error( "\n AutomatedTask ConfigError:" +
                     " Config {A: TSV} is empty \n" );
  }
  const arr2dTsv     = parseAsRectangular ( strTsv );  // [row,col]
const strColIdDate   = configs.get( "StrConfB1" );            // REQUIRED
const strColIdsNum   = configs.get( "StrConfB2" );            // REQUIRED
const strCountFormat = configs.get( "SelectConfC1" );         // "Separate", "Merged", "Hidden"
const strFyMonth     = configs.get( "StrConfC2" );            // not required
const strPocketC3    = configs.getObject ( "SelectConfC3" );  // REQUIRED
const numPocketD1    = configs.getObject ( "SelectConfD1" );  // not required
const numPocketD2    = configs.getObject ( "SelectConfD2" );  // not required
const numPocketD3    = configs.getObject ( "SelectConfD3" );  // not required




//// == Data Retrieving / ワークフローデータの参照 ==
// (Nothing. Retrieved via Expression Language in Config Retrieving)




//// == Calculating / 演算 ==
// パラメータのパースとバリデーション
const idxDate = parseInt(strColIdDate, 10);
if (isNaN(idxDate) || idxDate < 0) {
  throw new Error("\n AutomatedTask ConfigError: Invalid Date Column ID in B1 \n");
}

let arrIdxNum = [];
if (strColIdsNum !== "") {
  arrIdxNum = strColIdsNum.split(",").map(s => parseInt(s.trim(), 10));
  if (arrIdxNum.some(isNaN)) {
    throw new Error("\n AutomatedTask ConfigError: Invalid Numeric Column IDs in B2 \n");
  }
}

let yeMonth = 0;
if (strFyMonth !== "") {
  yeMonth = parseInt(strFyMonth, 10);
  if (isNaN(yeMonth) || yeMonth < 1 || yeMonth > 12) {
    throw new Error("\n AutomatedTask ConfigError: Invalid YE Month in C2 (must be 1-12) \n");
  }
}

// ヘッダー行の処理とチェック
if (arr2dTsv.length === 0) {
  throw new Error("\n AutomatedTask DataError: Input TSV is empty \n");
}
const headerRow = arr2dTsv[0];
if (idxDate >= headerRow.length) {
  throw new Error(`\n AutomatedTask ConfigError: Date Column ID (${idxDate}) is out of bounds \n`);
}
const numHeaders = arrIdxNum.map(idx => {
  if (idx >= headerRow.length) {
    throw new Error(`\n AutomatedTask ConfigError: Numeric Column ID (${idx}) is out of bounds \n`);
  }
  return headerRow[idx];
});

// 集計処理の準備
// Map: キー = 四半期ラベル, 値 = { count: 行数, sums: [Number, Number...] }
const mapAgg = new Map();
let minAbsQ = Infinity;
let maxAbsQ = -Infinity;

// データ行のループ(1行目はヘッダーとしてスキップ)
for (let i = 1; i < arr2dTsv.length; i++) {
  const row = arr2dTsv[i];
  const strDate = row[idxDate];

  // 空セルはスキップ
  if (!strDate || strDate.trim() === "") continue;

  let dateObj;
  try {
    dateObj = parseAsLocalDate(strDate);
  } catch (e) {
    engine.log(`Row ${i + 1} skipped: Failed to parse date "${strDate}".`);
    continue;
  }

  // ラベルと絶対四半期番号の取得
  const qInfo = getQuarterInfo(dateObj, yeMonth);
  const label = qInfo.label;
  const absQ = qInfo.absQ;

  // 最小・最大の四半期を記録
  if (absQ < minAbsQ) minAbsQ = absQ;
  if (absQ > maxAbsQ) maxAbsQ = absQ;

  // マップの初期化 (ECMAScript標準の数値 0 で初期化)
  if (!mapAgg.has(label)) {
    mapAgg.set(label, { count: 0, sums: new Array(arrIdxNum.length).fill(0) });
  }

  const aggData = mapAgg.get(label);
  aggData.count++;

  // 数値列の加算(不要文字の除去対応)
  for (let j = 0; j < arrIdxNum.length; j++) {
    const cellVal = row[arrIdxNum[j]];
    if (cellVal !== "") {
      // 「ピリオド(.)」「マイナス記号(-)」「数字(0-9)」以外をすべて除去
      const numValStr = cellVal.replace(/[^0-9.-]/g, ''); 
      const numVal = Number(numValStr);
      
      if (numValStr !== "" && !isNaN(numVal)) {
        aggData.sums[j] += numVal;
      } else if (cellVal.trim() !== "") {
        engine.log(`Row ${i + 1} Col ${arrIdxNum[j]} warning: Unparseable number "${cellVal}".`);
      }
    }
  }
}

// --- ギャップ(トビ)の穴埋め処理 ---
if (minAbsQ !== Infinity) {
  for (let q = minAbsQ; q <= maxAbsQ; q++) {
    const label = getLabelFromAbsoluteQuarter(q, yeMonth);
    if (!mapAgg.has(label)) {
      // 存在しない四半期なら count: 0, sums: 0 でセット
      mapAgg.set(label, { count: 0, sums: new Array(arrIdxNum.length).fill(0) });
    }
  }
}



// ==== 出力用TSVの構築 ====
let arrOutputTsv = [];
let outHeaderRow = [];

// ヘッダー設定
if (strCountFormat === "Merged") {
  outHeaderRow.push("Qtr-Label (Count)");
} else if (strCountFormat === "Hidden") {
  outHeaderRow.push("Qtr-Label");
} else {
  // "Separate" (デフォルト)
  outHeaderRow.push("Qtr-Label");
  outHeaderRow.push("Count");
}
outHeaderRow = outHeaderRow.concat(numHeaders);
arrOutputTsv.push(outHeaderRow.join("\t"));

// データ行のソートと構築(ラベル名で昇順ソート)
const sortedLabels = Array.from(mapAgg.keys()).sort();
for (const label of sortedLabels) {
  const agg = mapAgg.get(label);
  let rowData = [];

  if (strCountFormat === "Merged") {
    rowData.push(`${label} (${agg.count})`);
  } else if (strCountFormat === "Hidden") {
    rowData.push(label);
  } else {
    // "Separate" (デフォルト)
    rowData.push(label);
    rowData.push(agg.count.toString());
  }

  // 数値を文字列化してTSVのセルに追加
  for (const sum of agg.sums) {
    rowData.push(String(sum));
  }
  arrOutputTsv.push(rowData.join("\t"));
}



//// == Data Updating / ワークフローデータへの代入 ==

if ( strPocketC3 !== null ){ 
  engine.setData( strPocketC3, arrOutputTsv?.join( '\n' ) ?? "" );
}

if ( numPocketD1 !== null ){ 
  engine.setData( numPocketD1, new java.math.BigDecimal( strTsv.split("\n").length ) );
}
if ( numPocketD2 !== null ){ 
  engine.setData( numPocketD2, new java.math.BigDecimal( arr2dTsv.length ) );
}
if ( numPocketD3 !== null ){ 
  engine.setData( numPocketD3, new java.math.BigDecimal( arrOutputTsv.length ) );
}

} //////// END "main()" /////////////////////////////////////////////////////////////////

/**
 * 日付と決算月から四半期ラベルと絶対四半期番号(ソート・補間用)を生成する
 * @param {Date} dateObj - JavaScript Date object
 * @param {number} yeMonth - Year End Month (0 for standard quarter, 1-12 for FY)
 * @returns {Object} { label: string, absQ: number }
 */
function getQuarterInfo(dateObj, yeMonth) {
  const y = dateObj.getFullYear();
  const m = dateObj.getMonth() + 1; // 1-12

  if (yeMonth === 0) {
    // 通常の四半期 (Q-YYYYMM~MM)
    const q = Math.ceil(m / 3); // 1, 2, 3, 4
    const absQ = y * 4 + (q - 1);
    let qStr = "";
    if (q === 1) qStr = "01~03";
    else if (q === 2) qStr = "04~06";
    else if (q === 3) qStr = "07~09";
    else qStr = "10~12";
    return { label: `Q-${y}${qStr}`, absQ: absQ };
  } else {
    // FYベースの四半期 (FYYYYY-QX)
    let fy = y;
    if (m > yeMonth) {
      fy = y + 1;
    }
    let shiftedM = m - yeMonth;
    if (shiftedM <= 0) {
      shiftedM += 12;
    }
    const qNum = Math.ceil(shiftedM / 3);
    const absQ = fy * 4 + (qNum - 1);
    return { label: `FY${fy}-Q${qNum}`, absQ: absQ };
  }
}

/**
 * 絶対四半期番号と決算月から、ラベル文字列を復元する(トビの穴埋め用)
 * @param {number} absQ - Absolute Quarter Number
 * @param {number} yeMonth - Year End Month
 * @returns {string} Quarter label
 */
function getLabelFromAbsoluteQuarter(absQ, yeMonth) {
  if (yeMonth === 0) {
    const y = Math.floor(absQ / 4);
    const q = (absQ % 4) + 1;
    let qStr = "";
    if (q === 1) qStr = "01~03";
    else if (q === 2) qStr = "04~06";
    else if (q === 3) qStr = "07~09";
    else qStr = "10~12";
    return `Q-${y}${qStr}`;
  } else {
    const fy = Math.floor(absQ / 4);
    const qNum = (absQ % 4) + 1;
    return `FY${fy}-Q${qNum}`;
  }
}


/**
 * Parses TSV string as a two-dimensional rectangular data matrix and creates a 2D array.
 * @param {string} strTsv - The input TSV string
 * @returns {Array<Array<string>>} Rectangular 2D array
 */
function parseAsRectangular( strTsv ){
  const arrTsv = strTsv.split("\n");
  let numMinWidth   = Infinity;
  let numMaxWidth   = 0;
  let numBlanklines = 0;
  
  const parsedRows = [];
  for( let i = 0; i < arrTsv.length; i++ ){
    const line = arrTsv[i];
    if( line === "" ){
      numBlanklines++;
      continue;
    }
    const arrCells = line.split("\t");
    const len = arrCells.length;
    if( len < numMinWidth ){ numMinWidth = len; }
    if( len > numMaxWidth ){ numMaxWidth = len; }
    parsedRows.push( arrCells );
  }
  
  if( numMinWidth === Infinity ){
    numMinWidth = 0;
  }
  engine.log( " AutomatedTask TsvDataCheck:" + 
              " MinWidth:" + numMinWidth +
              " MaxWidth:" + numMaxWidth +
              " Lines:" + arrTsv.length +
              " (BlankLines:" + numBlanklines + ")" );

  for( let i = 0; i < parsedRows.length; i++ ){
    const row = parsedRows[i];
    while( row.length < numMaxWidth ){
      row.push( "" );
    }
  }
  return parsedRows;
}


/**
 * Parses a Date or Datetime string and returns a JavaScript `Date` object as local time.
 * Timezone information in the string (such as "Z" or "+09:00") is forcefully ignored.
 * Supports various formats: "YYYYMMDD", "YYYY-MM-DD", ISO 8601, Japanese localized formats, etc.
 * * 日付または日時の文字列を解析し、ローカル時刻として扱われるJavaScriptの `Date` オブジェクトを返します。
 * 文字列内のタイムゾーン情報("Z"や"+09:00"など)は強制的に無視されます。
 * "YYYYMMDD", "YYYY-MM-DD", ISO 8601, 日本語の日付文字列など、様々な形式をサポートします。
 *
 * @param {string} str - The date or datetime string to parse. / 解析する日付または日時の文字列。
 * @returns {Date} A local Date object. / ローカル時刻のDateオブジェクト。
 * @throws {Error} Throws an error if the string is empty, contains no numbers, or lacks required date parts.
 * / 文字列が空の場合、数字が含まれていない場合、または必要な日付要素(年月日)が不足している場合にエラーをスローします。
 * * @example
 * parseAsLocalDate("2026-12-31 23:59");     // Date 2026-12-31T23:59:00 (Local)
 * parseAsLocalDate("20261231T235959Z");     // Date 2026-12-31T23:59:00 (Local, 'Z' is ignored)
 * parseAsLocalDate("2026年12月31日");       // Date 2026-12-31T00:00:00 (Local)
 */
function parseAsLocalDate ( str ){ // strDateOrDatetime
  //
  // Searches a Date-or-Datetime String for YYYY, MM, DD, hh:mm in that order and
  //  returns JavaScript `Date` object.
  // Any format is forcibly recognized as LOCAL DATETIME. -- UNIQUE --
  // Supports "ISO 8601 format", "BPMS date format", "BPMS datetime format", etc,,,
  //
  // String "2026-12-31 23:59"          (Questetra BPMS datetime format)
  // ⇒ Date 2026-12-31T23:59:00+XX:00
  // String "2026-12-31"                (Questetra BPMS date format) 
  // ⇒ Date 2026-12-31T00:00:00+XX:00   // UNIQUE: not UTC
  // String "2026/12/31"                (Windows date-ja format)
  // ⇒ Date 2026-12-31T00:00:00+XX:00   // UNIQUE: not UTC
  // String "2026-12-31 23:59:59"       (SQL Time format)
  // ⇒ Date 2026-12-31T23:59:00+XX:00
  // String "2026-12-31T23:59:59.999Z"  (ISO 8601 format)
  // ⇒ Date 2026-12-31T23:59:00+XX:00   // UNIQUE: Timezone not evaluated
  // String "2026年12月31日"            (日本語/Japanese)
  // ⇒ Date 2026-12-31T00:00:00+XX:00
  //
  // String "20261231"
  // ⇒ Date 2026-12-31T00:00:00+XX:00   // UNIQUE: not UTC
  // String "20261231T235959Z"          (ISO 8601 format)
  // ⇒ Date 2026-12-31T23:59:00+XX:00   // UNIQUE: Timezone not evaluated
  // String "20261231T2359"
  // ⇒ Date 2026-12-31T23:59:00+XX:00

  if( str === "" ){
    throw new Error( "\n AutomatedTask ParseDateError:" +
                     " String is empty \n" );
  }
  const arrNumParts = str.match( /\d+/g );
  if( arrNumParts === null ){
    throw new Error( "\n AutomatedTask ParseDateError:" +
                     " No numeric characters in: " + str + "\n" );
  }

  /// function default
  let numYear    = 0; // limit in QBPMS: 1900 to 2100 (asof 2026-06)
  let indexMonth = 0;
  let numDay     = 0;
  let numHours   = 0;
  let numMinutes = 0;

  /// case: startsWith YYYYMMDD
  if( arrNumParts[0].length === 8 ){
    numYear      = parseInt( arrNumParts[0].slice( 0, 4 ), 10 );
    indexMonth   = parseInt( arrNumParts[0].slice( 4, 6 ), 10 ) - 1;
    numDay       = parseInt( arrNumParts[0].slice( 6, 8 ), 10 );
    if (arrNumParts.length > 1) {
      if (arrNumParts[1].length >= 4) {
        // like "2359" or "235959Z"
        numHours = parseInt(arrNumParts[1].slice(0, 2), 10);
        numMinutes = parseInt(arrNumParts[1].slice(2, 4), 10);
      } else {
        // like "23:59" -> arrNumParts is ['...', '23', '59']
        numHours = parseInt(arrNumParts[1], 10);
        if (arrNumParts.length > 2) {
          numMinutes = parseInt(arrNumParts[2], 10);
        }
      }
    }

  /// case: not startsWith YYYYMMDD, like "2026-12-31 23:59"
  }else{
    if( arrNumParts.length < 3){
      throw new Error( "\n AutomatedTask ParseDateError:" +
                       " 3 Parts of numeric characters are needed in: " + str + "\n" );
    }
    numYear      = parseInt( arrNumParts[0], 10 );
    indexMonth   = parseInt( arrNumParts[1], 10 ) - 1;
    numDay       = parseInt( arrNumParts[2], 10 );
  if (arrNumParts.length > 3) {
      numHours = parseInt(arrNumParts[3], 10);
    }
    if (arrNumParts.length > 4) {
      numMinutes = parseInt(arrNumParts[4], 10);
    }
  }

  /// return JavaScript `Date` object
  const localDate = new Date(numYear, indexMonth, numDay, numHours, numMinutes);
  localDate.setFullYear(numYear);
  return localDate;
}




/*
### Sample Data

==== input TSV ====
取引No	取引日	借方勘定科目	借方補助科目	借方部門	借方取引先	借方税区分	借方インボイス	借方金額 (円)	借方税額
1	2026/04/01	消耗品費		管理部	文具ショップA	課税仕入 10%	適格	5500	550
2	2026/04/02	旅費交通費		営業部	JR東日本	課税仕入 10%	適格	1320	132
3	2026/06/03	通信費		管理部	携帯キャリアB	課税仕入 10%	適格	8800	880
4	2026/07/05	広告宣伝費		マーケティング部	広告代理店C	課税仕入 10%	適格	110000	11000
5	2027-01-06 12:30	広告宣伝費		マーケティング部	広告代理店D	課税仕入 10%	適格	33000	3300

==== output TSV-1 (date:id1) ====
Qtr-Label	Count
Q-202604~06	3
Q-202607~09	2

==== output TSV-2 (date:id1, sum:8) ====
Qtr-Label	Count	借方金額 (円)
Q-202604~06	3	15620
Q-202607~09	2	143000

==== output TSV-3 (date:id1, sum:8,9)  ====
Qtr-Label (Count)	借方金額 (円)	借方税額
FY2027-Q1 (3)	15620	1562
FY2027-Q2 (1)	110000	11000
FY2027-Q3 (0)	0	0
FY2027-Q4 (1)	33000	3300




### NOTES-en

* When a case reaches this [Automated Step], the TSV aggregation process is automatically executed.
    * The first row of the input TSV is recognized as the header row.
* The input TSV string is parsed as a simple tab-separated values string.
    * Double quotes and other specific characters within the TSV string are retained as is.
    * Blank lines within the TSV string are ignored.
    * For rows lacking the expected number of cells, empty string ("") cells are automatically appended.
    * The number of rows in the input/output TSV string can be stored as Case Data.
* The date column used as the aggregation key is specified by its column ID.
    * It does not necessarily have to be Column A (id=0).
    * If Column B (id=1) is the aggregation key, set "1".
* Various aggregation results can be output as TSV strings.
    * `Qtr-Label	Count`
        * `Q-202604~06	3`
        * `Q-202607~09	2`
    * `Qtr-Label	Count	Debit Amount (JPY)`
        * `Q-202604~06	3	15620`
        * `Q-202607~09	2	143000`
    * `Qtr-Label (Count)	Debit Amount (JPY)	Debit Tax`
        * `Q-202604~06 (3)	15620	1562`
        * `Q-202607~09 (2)	143000	14300`


### NOTES-ja

* 案件(ケース)がこの[自動工程]に到達すると、TSV集計処理が自動実行されます。
    * 入力TSVの1行目は、ヘッダー行として認識されます。
* 入力TSV文字列は、シンプルなタブ区切り文字列としてパースされます。
    * TSV文字列内のダブルクオート文字等も、そのまま保持されます。
    * TSV文字列内の空行は、無視されます。
    * TSV文字列内でセル数の足りない行は、空文字("")のセルが自動的に補完されます。
    * 入出力TSVの行数は、ケースデータとして格納可能です。
* 集計キーとなる日付列はIDで指定します
    * 必ずしもA列(id=0)でなくても構いません。
    * B列(id=1)が集計キーとなる場合、"1" とセットします。
* さまざまな集計結果を、TSV文字列として出力させることが可能です。
    * `Qtr-Label	Count`
        * `Q-202604~06	3`
        * `Q-202607~09	2`
    * `Qtr-Label	Count	借方金額 (円)`
        * `Q-202604~06	3	15620`
        * `Q-202607~09	2	143000`
    * `Qtr-Label (Count)	借方金額 (円)	借方税額`
        * `Q-202604~06 (3)	15620	1562`
        * `Q-202607~09 (2)	143000	14300`



### APPENDIX-en
* The default format for the quarter label is `Q-202604~06`.
    * By setting the Year-End (YE) Month, you can switch to the FY format (Fiscal Year basis / End-Year style).
        * Note) End-Year style: FY2027 = 2026/04/01 to 2027/03/31
        * e.g.: "3"; `Q-202604~06` → `FY2027-Q1`
        * e.g.: "12"; `Q-202604~06` → `FY2026-Q2`
* Cells in the specified numeric columns are parsed as numbers as much as possible. *(Excluding the first header row)*
    * Any characters other than periods (`.`), minus signs (`-`), and digits (`0-9`) are stripped out.
        * such as commas acting as digit separators or currency symbols
    * The resulting string is evaluated using `Number()`.
    * If parsing fails, the value is treated as `0`.
    * e.g.: `$ 1,500.50 usd` ⇒ `1500.5`

### APPENDIX-ja
* 四半期ラベルのデフォルトは `Q-202604~06` です。
    * 決算月をセットすればFY方式(会計年度ベース/終了年方式)に変更可能です。
        * ※ 終了年方式: FY2027 = 2026/04/01 ~ 2027/03/31
        * 例: "3"; `Q-202604~06` → `FY2027-Q1`
        * 例: "12"; `Q-202604~06` → `FY2026-Q2`
* 数値列として指定された列の各データは、可能な限り数値として解析されます。※先頭1行目(ヘッダー行)を除く
    * 「ピリオド(.)」「マイナス記号(-)」「数字(0~9)」以外の文字が存在する場合は、それらが除去された上で解析されます。
        * 桁区切りカンマや通貨記号など
    * 除去後の文字列は `Number()` によって数値化されます。
    * 解析に失敗した場合は `0` として加算されます。
    * 例: `$ 1,500.50 usd` ⇒ `1500.5`
*/

Download

warning 自由改変可能な JavaScript (ECMAScript) コードです。いかなる保証もありません。
(アドオン自動工程のインストールは Professional editionでのみ可能です)

Notes

  • 案件(ケース)がこの[自動工程]に到達すると、TSV集計処理が自動実行されます。
    • 入力TSVの1行目は、ヘッダー行として認識されます。
  • 入力TSV文字列は、シンプルなタブ区切り文字列としてパースされます。
    • TSV文字列内のダブルクオート文字等も、そのまま保持されます。
    • TSV文字列内の空行は、無視されます。
    • TSV文字列内でセル数の足りない行は、空文字(””)のセルが自動的に補完されます。
    • 入出力TSVの行数は、ケースデータとして格納可能です。
  • 集計キーとなる日付列はIDで指定します
    • 必ずしもA列(id=0)でなくても構いません。
    • B列(id=1)が集計キーとなる場合、”1″ とセットします。
  • さまざまな集計結果を、TSV文字列として出力させることが可能です。
    • Qtr-Label Count
      • Q-202604~06 3
      • Q-202607~09 2
    • Qtr-Label Count 借方金額 (円)
      • Q-202604~06 3 15620
      • Q-202607~09 2 143000
    • Qtr-Label (Count) 借方金額 (円) 借方税額
      • Q-202604~06 (3) 15620 1562
      • Q-202607~09 (2) 143000 14300

Capture

Appendix

  • 四半期ラベルのデフォルトは Q-202604~06 です。
    • 決算月をセットすればFY方式(会計年度ベース/終了年方式)に変更可能です。
      • ※ 終了年方式: FY2027 = 2026/04/01 ~ 2027/03/31
      • 例: “3”; Q-202604~06FY2027-Q1
      • 例: “12”; Q-202604~06FY2026-Q2
  • 数値列として指定された列の各データは、可能な限り数値として解析されます。※先頭1行目(ヘッダー行)を除く
    • 「ピリオド(.)」「マイナス記号(-)」「数字(0~9)」以外の文字が存在する場合は、それらが除去された上で解析されます。
      • 桁区切りカンマや通貨記号など
    • 除去後の文字列は Number() によって数値化されます。
    • 解析に失敗した場合は 0 として加算されます。
    • 例: $ 1,500.50 usd1500.5

See Also

Questetra Supportをもっと見る

今すぐ購読し、続きを読んで、すべてのアーカイブにアクセスしましょう。

続きを読む