Gemini のアシスタント機能を使用して計算フィールドを作成すると、Looker Studio は次の情報を使用して数式を生成します。
Looker Studio にフィールドの作成または編集を指示するために記述するプロンプト
変更または調整するフィールドの数式定義
基盤となるデータソースのスキーマ
サンプル プロンプト
はじめに、さまざまな種類のフィールド用のサンプル プロンプトを以下に示します。
次のプロンプトを入力してみてください。
Merge city and state like City, State
Looker Studio から、以下のようなフィールドの定義が返されることがあります。
CONCAT(Users City, ", ", Users State)
次のプロンプトを入力してみてください。
bucket sale price in groups of 20
Looker Studio から、以下のようなフィールドの定義が返されることがあります。
CASE
WHEN Order Items Sale Price < 20 THEN "0-20"
WHEN Order Items Sale Price < 40 THEN "20-40"
WHEN Order Items Sale Price < 60 THEN "40-60"
WHEN Order Items Sale Price < 80 THEN "60-80"
WHEN Order Items Sale Price < 100 THEN "80-100"
WHEN Order Items Sale Price < 120 THEN "100-120"
WHEN Order Items Sale Price < 140 THEN "120-140"
WHEN Order Items Sale Price < 160 THEN "140-160"
WHEN Order Items Sale Price < 180 THEN "160-180"
WHEN Order Items Sale Price < 200 THEN "180-200"
ELSE "200+"
END
トラブルシューティング
Looker Studio で計算フィールドを作成する際にエラーが発生した場合は、クエリやグラフを使って得られる結果ではなく、計算フィールドを使って得られる結果を求めていることを確認してください。
フィードバックを送信
計算フィールドが生成されると、Looker Studio からフィールドに関するフィードバックを入力するように求められます。生成されたフィールドに問題がなければ、thumb_upRate positive の高評価アイコンをクリックします。生成されたフィールドに問題がある場合や、この機能について他のフィードバックを送信する場合は、thumb_downRate negative の低評価アイコンをクリックします。入力したプロンプトと、Looker Studio で作成された数式を含めてください。このフィードバックは開発チーム向けに収集され、Gemini in Looker モデルのトレーニングには使用されません。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-05 UTC。"],[],[],null,["# Create calculated fields with Gemini assistance\n\n\u003cbr /\u003e\n\n|\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis documentation describes how to use [Gemini in Looker](/looker/docs/studio/gemini-in-looker-overview) to help you create calculated fields by letting you describe the kinds of fields that you want.\n\nLooker Studio prompts you to describe the fields that you'd like to create. Based on your input, Looker Studio suggests a formula for a [calculated field](/looker/docs/studio/about-calculated-fields) by using fields from your data source along with Looker Studio functions and operators.\n\nGemini in Looker is a product in the [Gemini for Google Cloud](/gemini/docs/overview) portfolio that provides generative AI-powered assistance to help you analyze and gain valuable insights from your data.\n\nLearn [how and when Gemini\nfor Google Cloud uses your data](/gemini/docs/discover/data-governance).\n\nThis page is intended for report editors in Looker Studio.\n\nBefore you begin\n----------------\n\nTo use this Gemini in Looker feature, you need to fulfill the following requirements:\n\n- You must be a user under a [Looker Studio Pro subscription](/looker/docs/studio/looker-studio-pro-subscription-overview). Looker Studio Pro licenses are [available at no cost](/looker/docs/admin-panel-platform-lsp) to Looker users.\n- To be able to create chart-specific calculated fields, you must be an editor of the report.\n- [Field Editing in Reports](/looker/docs/studio/edit-fields-in-your-reports) must be enabled in the data source.\n- Gemini in Looker must be [enabled for your Looker Studio Pro project](/looker/docs/studio/enable-and-disable-gemini-in-looker-for-looker-studio).\n\nCreate a calculated field with Gemini assistance\n------------------------------------------------\n\n| As an early-stage technology, Gemini for Google Cloud\n| products can generate output that seems plausible but is factually incorrect. We recommend that you\n| validate all output from Gemini for Google Cloud products before you use it.\n| For more information, see\n| [Gemini for Google Cloud and responsible AI](/gemini/docs/discover/responsible-ai).\n\nTo create a calculated field with Gemini assistance, follow these steps:\n\n1. When you're [writing a calculated field](/looker/docs/studio/about-calculated-fields), click the **Help me write a calculated field** icon in the bottom right of the field editor.\n2. If you have not begun writing a calculated field, Looker Studio prompts you to select a suggested prompt or to describe the kind of calculated field that you want to create.\n - To select one of the suggested prompts, click the prompt.\n - To describe the kind of calculated field that you want to create, write a description and then click **Create** . See the **Sample prompts** section for examples of descriptions that you can write.\n3. If you have already begun writing a calculated field, Looker Studio will use that formula as context. Describe how you would like to change the calculated field, and then click **Create** .\n - To edit your original prompt, hover over the prompt and click the **Edit** icon. Edit your prompt, and then click **Update.**\n - To remove the previous formula from Looker Studio's context, hover over the formula and click the **Reset** icon.\n - To refine your formula, click **Refine** . Next, provide Looker Studio with additional information about your formula, such as adding or removing a bucket, or adding another field to a concatenation. Finally, click **Create**.\n4. To add the generated formula to your calculated field definition, click **Apply**.\n5. To save your field definition, click **Save**.\n\nTo exit the formula generation dialog at any point without saving your changes, close the dialog by clicking the **X** in the top right corner or by clicking outside of the dialog.\n\n### Limitations\n\nNote the following limitations on calculated field creation:\n\n- Gemini in Looker can help you create only calculated fields that meet Looker Studio criteria of [what you can do with calculated fields](/looker/docs/studio/about-calculated-fields).\n- Looker Studio won't suggest [parameters](/looker/docs/studio/parameters) or a [NATIVE_DIMENSION](/looker/docs/studio/nativedimension) when it suggests a calculated field.\n- The [Looker connector](/looker/docs/studio/limits-of-the-looker-connector#support-of-looker-studio-features) supports only [some functions](/looker/docs/studio/limits-of-the-looker-connector#expandable-1) for calculated fields.\n\n### Information used by Gemini in Looker\n\nWhen you create a calculated field with Gemini assistance, Looker Studio uses the following information to generate formulas:\n\n- The prompt that you write to instruct Looker Studio to create or edit a field\n- The formula definition for any field that you change or refine\n- The schema of the underlying data source\n\nSample prompts\n--------------\n\nTo get you started, here are some sample prompts for different kinds of fields:\n\n- Try entering the following prompt:\n\n Merge city and state like City, State\n\n Looker Studio may return a field definition like the following: \n\n CONCAT(Users City, \", \", Users State)\n\n- Try entering the following prompt:\n\n bucket sale price in groups of 20\n\n Looker Studio may return a field definition like the following: \n\n CASE\n WHEN Order Items Sale Price \u003c 20 THEN \"0-20\"\n WHEN Order Items Sale Price \u003c 40 THEN \"20-40\"\n WHEN Order Items Sale Price \u003c 60 THEN \"40-60\"\n WHEN Order Items Sale Price \u003c 80 THEN \"60-80\"\n WHEN Order Items Sale Price \u003c 100 THEN \"80-100\"\n WHEN Order Items Sale Price \u003c 120 THEN \"100-120\"\n WHEN Order Items Sale Price \u003c 140 THEN \"120-140\"\n WHEN Order Items Sale Price \u003c 160 THEN \"140-160\"\n WHEN Order Items Sale Price \u003c 180 THEN \"160-180\"\n WHEN Order Items Sale Price \u003c 200 THEN \"180-200\"\n ELSE \"200+\"\n END\n\nTroubleshooting\n---------------\n\nIf you get an error while creating a calculated field with Looker Studio, make sure that you are asking for a [result that you can achieve with calculated fields](/looker/docs/studio/about-calculated-fields), rather than the results of a query or a chart.\n\nProvide feedback\n----------------\n\nAfter generating a calculated field, Looker Studio will prompt you to provide feedback on the field. If the generated field looks correct, click the thumb_up **Rate positive** thumbs-up icon. If the generated field looks incorrect, or if you'd like to provide other feedback on this feature, click the thumb_down **Rate negative** thumbs-down icon. Include the prompt that you entered as well as the formula that Looker Studio created. This feedback is collected for our development team and is not used to train the Gemini in Looker model.\n| **Note:** Gemini in Looker is in preview with limited support. We encourage you to share your feedback to help us improve. To report bugs or issues, reach out to [Looker Support](/looker/docs/best-practices/looker-support-details) and be sure to include the following details:\n|\n| - A clear description of the problem and the expected behavior\n| - Steps to reproduce the issue\n| - Any additional relevant details\n\nRelated resources\n-----------------\n\n- [Gemini for Google Cloud overview](/gemini/docs/overview)\n- [Gemini in Looker](/gemini/docs/looker/overview)"]]