[{"data":1,"prerenderedAt":605},["ShallowReactive",2],{"navigation":3,"page-\u002Fen\u002Flenses-and-explorations\u002Fchart-table-and-saql-modes":250,"\u002Fen\u002Flenses-and-explorations\u002Fchart-table-and-saql-modes-surround":599,"comments-\u002Fen\u002Flenses-and-explorations\u002Fchart-table-and-saql-modes":604},[4],{"title":5,"path":6,"stem":7,"children":8,"page":249},"En","\u002Fen","en",[9,53,87,129,163,200,242],{"title":10,"path":11,"stem":12,"children":13,"icon":52},"CRM Analytics Foundations","\u002Fen\u002Ffoundations","en\u002F1.foundations\u002F1.index",[14,16,20,24,28,32,36,40,44,48],{"title":15,"path":11,"stem":12},"Welcome & Dev Org",{"title":17,"path":18,"stem":19},"Graded Quiz","\u002Fen\u002Ffoundations\u002Fquiz","en\u002F1.foundations\u002F10.quiz",{"title":21,"path":22,"stem":23},"What Is CRM Analytics?","\u002Fen\u002Ffoundations\u002Fwhat-is-crm-analytics","en\u002F1.foundations\u002F2.what-is-crm-analytics",{"title":25,"path":26,"stem":27},"Architecture","\u002Fen\u002Ffoundations\u002Farchitecture-and-data-flow","en\u002F1.foundations\u002F3.architecture-and-data-flow",{"title":29,"path":30,"stem":31},"The Data Layer","\u002Fen\u002Ffoundations\u002Fthe-data-layer","en\u002F1.foundations\u002F4.the-data-layer",{"title":33,"path":34,"stem":35},"The Design Layer","\u002Fen\u002Ffoundations\u002Fthe-design-layer","en\u002F1.foundations\u002F5.the-design-layer",{"title":37,"path":38,"stem":39},"The Intelligence Layer","\u002Fen\u002Ffoundations\u002Fthe-intelligence-layer","en\u002F1.foundations\u002F6.the-intelligence-layer",{"title":41,"path":42,"stem":43},"Hands-On Tour","\u002Fen\u002Ffoundations\u002Fhands-on-tour","en\u002F1.foundations\u002F7.hands-on-tour",{"title":45,"path":46,"stem":47},"Six Adoption Steps","\u002Fen\u002Ffoundations\u002Fsix-steps-and-interview-prep","en\u002F1.foundations\u002F8.six-steps-and-interview-prep",{"title":49,"path":50,"stem":51},"Interview Questions","\u002Fen\u002Ffoundations\u002Finterview-questions","en\u002F1.foundations\u002F9.interview-questions","i-lucide-compass",{"title":54,"path":55,"stem":56,"children":57,"icon":86},"Setup & User Provisioning","\u002Fen\u002Fsetup","en\u002F2.setup\u002F1.index",[58,60,64,68,72,76,80,83],{"title":59,"path":55,"stem":56},"Provisioning Users",{"title":61,"path":62,"stem":63},"Licenses & Permissions","\u002Fen\u002Fsetup\u002Flicenses-and-permission-sets","en\u002F2.setup\u002F2.licenses-and-permission-sets",{"title":65,"path":66,"stem":67},"Integration User","\u002Fen\u002Fsetup\u002Fthe-integration-user","en\u002F2.setup\u002F3.the-integration-user",{"title":69,"path":70,"stem":71},"Security User","\u002Fen\u002Fsetup\u002Fthe-security-user","en\u002F2.setup\u002F4.the-security-user",{"title":73,"path":74,"stem":75},"Analytics Settings","\u002Fen\u002Fsetup\u002Fanalytics-settings","en\u002F2.setup\u002F5.analytics-settings",{"title":77,"path":78,"stem":79},"Hands-On Access","\u002Fen\u002Fsetup\u002Fhands-on-assigning-access","en\u002F2.setup\u002F6.hands-on-assigning-access",{"title":17,"path":81,"stem":82},"\u002Fen\u002Fsetup\u002Fquiz","en\u002F2.setup\u002F7.quiz",{"title":49,"path":84,"stem":85},"\u002Fen\u002Fsetup\u002Finterview-questions","en\u002F2.setup\u002F8.interview-questions","i-lucide-settings-2",{"title":88,"path":89,"stem":90,"children":91,"icon":128},"Creating Datasets","\u002Fen\u002Fcreating-datasets","en\u002F3.creating-datasets\u002F1.index",[92,94,97,101,105,109,113,117,121,125],{"title":93,"path":89,"stem":90},"What Is a Dataset?",{"title":17,"path":95,"stem":96},"\u002Fen\u002Fcreating-datasets\u002Fquiz","en\u002F3.creating-datasets\u002F10.quiz",{"title":98,"path":99,"stem":100},"The Data Landscape","\u002Fen\u002Fcreating-datasets\u002Fthe-data-landscape","en\u002F3.creating-datasets\u002F2.the-data-landscape",{"title":102,"path":103,"stem":104},"Upload a CSV","\u002Fen\u002Fcreating-datasets\u002Fload-data-from-csv","en\u002F3.creating-datasets\u002F3.load-data-from-csv",{"title":106,"path":107,"stem":108},"Grain, Lookups & Joins","\u002Fen\u002Fcreating-datasets\u002Fgrain-lookups-and-joins","en\u002F3.creating-datasets\u002F4.grain-lookups-and-joins",{"title":110,"path":111,"stem":112},"Dataset Builder","\u002Fen\u002Fcreating-datasets\u002Fbuild-with-dataset-builder","en\u002F3.creating-datasets\u002F5.build-with-dataset-builder",{"title":114,"path":115,"stem":116},"Run the Dataflow","\u002Fen\u002Fcreating-datasets\u002Frun-and-troubleshoot-the-dataflow","en\u002F3.creating-datasets\u002F6.run-and-troubleshoot-the-dataflow",{"title":118,"path":119,"stem":120},"Build with a Recipe","\u002Fen\u002Fcreating-datasets\u002Fbuild-the-same-dataset-with-a-recipe","en\u002F3.creating-datasets\u002F7.build-the-same-dataset-with-a-recipe",{"title":122,"path":123,"stem":124},"Combine Datasets","\u002Fen\u002Fcreating-datasets\u002Fcombine-datasets","en\u002F3.creating-datasets\u002F8.combine-datasets",{"title":49,"path":126,"stem":127},"\u002Fen\u002Fcreating-datasets\u002Finterview-questions","en\u002F3.creating-datasets\u002F9.interview-questions","i-lucide-database",{"title":130,"path":131,"stem":132,"children":133,"icon":162},"Lenses & Explorations","\u002Fen\u002Flenses-and-explorations","en\u002F4.lenses-and-explorations\u002F1.index",[134,136,140,144,148,152,156,159],{"title":135,"path":131,"stem":132},"What Is a Lens?",{"title":137,"path":138,"stem":139},"Analytics Tab & Apps","\u002Fen\u002Flenses-and-explorations\u002Fthe-analytics-tab-and-apps","en\u002F4.lenses-and-explorations\u002F2.the-analytics-tab-and-apps",{"title":141,"path":142,"stem":143},"Explorer Mode Basics","\u002Fen\u002Flenses-and-explorations\u002Fexplorer-mode-basics","en\u002F4.lenses-and-explorations\u002F3.explorer-mode-basics",{"title":145,"path":146,"stem":147},"Chart, Table & SAQL","\u002Fen\u002Flenses-and-explorations\u002Fchart-table-and-saql-modes","en\u002F4.lenses-and-explorations\u002F4.chart-table-and-saql-modes",{"title":149,"path":150,"stem":151},"Editing Fields","\u002Fen\u002Flenses-and-explorations\u002Fediting-fields-and-metadata","en\u002F4.lenses-and-explorations\u002F5.editing-fields-and-metadata",{"title":153,"path":154,"stem":155},"Conversational Analytics","\u002Fen\u002Flenses-and-explorations\u002Fconversational-analytics","en\u002F4.lenses-and-explorations\u002F6.conversational-analytics",{"title":17,"path":157,"stem":158},"\u002Fen\u002Flenses-and-explorations\u002Fquiz","en\u002F4.lenses-and-explorations\u002F7.quiz",{"title":49,"path":160,"stem":161},"\u002Fen\u002Flenses-and-explorations\u002Finterview-questions","en\u002F4.lenses-and-explorations\u002F8.interview-questions","i-lucide-search",{"title":164,"path":165,"stem":166,"children":167,"icon":199},"Designing Dashboards","\u002Fen\u002Fdesigning-dashboards","en\u002F5.designing-dashboards\u002F1.index",[168,169,173,177,181,185,189,193,196],{"title":164,"path":165,"stem":166},{"title":170,"path":171,"stem":172},"Conditional Formatting","\u002Fen\u002Fdesigning-dashboards\u002Fconditional-formatting","en\u002F5.designing-dashboards\u002F2.conditional-formatting",{"title":174,"path":175,"stem":176},"Date Toggles & Faceting","\u002Fen\u002Fdesigning-dashboards\u002Fdate-toggles-and-faceting","en\u002F5.designing-dashboards\u002F3.date-toggles-and-faceting",{"title":178,"path":179,"stem":180},"Tables, Images & Themes","\u002Fen\u002Fdesigning-dashboards\u002Ftables-images-and-themes","en\u002F5.designing-dashboards\u002F4.tables-images-and-themes",{"title":182,"path":183,"stem":184},"Tooltips & Chart Markers","\u002Fen\u002Fdesigning-dashboards\u002Ftooltips-and-chart-markers","en\u002F5.designing-dashboards\u002F5.tooltips-and-chart-markers",{"title":186,"path":187,"stem":188},"KPI Micro Charts","\u002Fen\u002Fdesigning-dashboards\u002Fkpi-micro-charts","en\u002F5.designing-dashboards\u002F6.kpi-micro-charts",{"title":190,"path":191,"stem":192},"Linking Dashboards","\u002Fen\u002Fdesigning-dashboards\u002Flinking-dashboards","en\u002F5.designing-dashboards\u002F7.linking-dashboards",{"title":17,"path":194,"stem":195},"\u002Fen\u002Fdesigning-dashboards\u002Fquiz","en\u002F5.designing-dashboards\u002F8.quiz",{"title":49,"path":197,"stem":198},"\u002Fen\u002Fdesigning-dashboards\u002Finterview-questions","en\u002F5.designing-dashboards\u002F9.interview-questions","i-lucide-layout-dashboard",{"title":201,"path":202,"stem":203,"children":204,"icon":241},"Collaboration","\u002Fen\u002Fcollaboration","en\u002F6.collaboration\u002F1.index",[205,207,210,214,218,222,226,230,234,238],{"title":206,"path":202,"stem":203},"Why Collaboration Matters",{"title":49,"path":208,"stem":209},"\u002Fen\u002Fcollaboration\u002Finterview-questions","en\u002F6.collaboration\u002F10.interview-questions",{"title":211,"path":212,"stem":213},"Sharing a Dashboard","\u002Fen\u002Fcollaboration\u002Fsharing-a-dashboard","en\u002F6.collaboration\u002F2.sharing-a-dashboard",{"title":215,"path":216,"stem":217},"Notifications & Annotations","\u002Fen\u002Fcollaboration\u002Fnotifications-and-annotations","en\u002F6.collaboration\u002F3.notifications-and-annotations",{"title":219,"path":220,"stem":221},"Downloading Data","\u002Fen\u002Fcollaboration\u002Fdownloading-data","en\u002F6.collaboration\u002F4.downloading-data",{"title":223,"path":224,"stem":225},"Self-Service Explore","\u002Fen\u002Fcollaboration\u002Fself-service-exploration","en\u002F6.collaboration\u002F5.self-service-exploration",{"title":227,"path":228,"stem":229},"Views","\u002Fen\u002Fcollaboration\u002Fviews","en\u002F6.collaboration\u002F6.views",{"title":231,"path":232,"stem":233},"Subscriptions & Watchlists","\u002Fen\u002Fcollaboration\u002Fsubscriptions-and-watchlists","en\u002F6.collaboration\u002F7.subscriptions-and-watchlists",{"title":235,"path":236,"stem":237},"Onboarding & Learn","\u002Fen\u002Fcollaboration\u002Fonboarding-and-learn","en\u002F6.collaboration\u002F8.onboarding-and-learn",{"title":17,"path":239,"stem":240},"\u002Fen\u002Fcollaboration\u002Fquiz","en\u002F6.collaboration\u002F9.quiz","i-lucide-users",{"title":243,"path":244,"stem":245,"children":246,"icon":248},"This is Section","\u002Fen\u002Fthis-is-section","en\u002F7.this-is-section\u002F1.index",[247],{"title":243,"path":244,"stem":245},"i-lucide-book-open",false,{"id":251,"title":252,"access":253,"body":254,"description":589,"extension":590,"interview":253,"links":253,"meta":591,"navigation":592,"passScore":253,"path":146,"quiz":253,"seo":593,"stem":147,"video":594,"__hash__":598},"docs\u002Fen\u002F4.lenses-and-explorations\u002F4.chart-table-and-saql-modes.md","Chart, Table, and SAQL Modes",null,{"type":255,"value":256,"toc":579},"minimark",[257,261,275,278,283,288,295,302,340,351,355,358,363,374,381,385,399,402,428,431,435,441,445,456,504,527,542,556,560,564,575],[258,259,252],"h1",{"id":260},"chart-table-and-saql-modes",[262,263,264,265,269,270,274],"p",{},"Everything in the last lesson built ",[266,267,268],"strong",{},"one query",". What changes now is how that query's result is ",[271,272,273],"em",{},"presented"," — and a lens gives you three modes to choose from. Same data, same query, three very different jobs.",[262,276,277],{},"The mode switcher sits on the left edge of the lens: a chart icon, a table icon, and an advanced-editor icon.",[279,280],"lesson-cards",{":columns":281,":items":282},"3","[{\"title\":\"Chart mode\",\"icon\":\"i-lucide-bar-chart-3\",\"description\":\"For seeing shape — comparison, trend, distribution, outliers. The default, and where most explorations live.\"},{\"title\":\"Table mode\",\"icon\":\"i-lucide-table\",\"description\":\"For reading exact values, checking raw rows, and building cross-tabs with derived columns.\"},{\"title\":\"Advanced (SAQL) mode\",\"icon\":\"i-lucide-code\",\"description\":\"For everything the UI can't express — and for learning what the UI has been writing on your behalf.\"}]",[284,285,287],"h2",{"id":286},"chart-mode","Chart mode",[262,289,290,291,294],{},"Click the chart-type icon and you get the ",[266,292,293],{},"chart picker",": bar, column, stacked, line, timeline, donut, funnel, scatter, heat map, geo maps, and a good few more. The picker greys out types your current query can't support — a donut needs a grouping, a scatter needs two measures — which is a useful hint about what your query is missing.",[262,296,297,298,301],{},"Next to it is the ",[266,299,300],{},"formatting \u002F properties panel",", and it's worth spending real time in. This is where you set:",[303,304,305,312,318,324,330],"ul",{},[306,307,308,311],"li",{},[266,309,310],{},"Axis labels and ranges"," — including forcing an axis to start at zero, which stops a bar chart from lying about the size of a difference.",[306,313,314,317],{},[266,315,316],{},"Legend"," position, or turning it off when the chart is self-explanatory.",[306,319,320,323],{},[266,321,322],{},"Value labels"," on the bars themselves, so readers don't have to eyeball against an axis.",[306,325,326,329],{},[266,327,328],{},"Number formatting"," — abbreviated (1.2M), decimal places, prefixes.",[306,331,332,335,336,339],{},[266,333,334],{},"Sort order",", ",[266,337,338],{},"colors",", and reference lines.",[341,342,344],"tip",{"icon":343},"i-lucide-lightbulb",[262,345,346,347,350],{},"Formatting you apply in a lens travels with it. Get the chart looking right ",[271,348,349],{},"here",", before you clip it to a dashboard — otherwise you'll be redoing the same formatting inside every dashboard that uses it.",[284,352,354],{"id":353},"table-mode","Table mode",[262,356,357],{},"Switch to the table icon and you get three distinct table types. They are genuinely different tools, not variations on a theme.",[359,360,362],"h3",{"id":361},"values-table","Values table",[262,364,365,366,369,370,373],{},"The ",[266,367,368],{},"values table"," shows ",[266,371,372],{},"raw rows"," — no aggregation at all. This is your window into the actual records behind a number, and it's the single most useful debugging tool in the product. Total looks doubled? Open a values table, filter to one account, and count the rows. You'll usually spot the fan-out join immediately.",[262,375,376,377,380],{},"It opens with a set of ",[266,378,379],{},"default columns"," chosen from the dataset's metadata (which you can change — that's the next lesson). Add or remove columns from the field list on the left.",[359,382,384],{"id":383},"compare-table","Compare table",[262,386,365,387,390,391,394,395,398],{},[266,388,389],{},"compare table"," is the aggregated, spreadsheet-style view: groupings down the left, measures across the top. Its superpower is the ",[266,392,393],{},"formula editor"," — you can add a ",[266,396,397],{},"derived column"," computed from the other columns in the table.",[262,400,401],{},"That's how you build things the query alone won't give you:",[303,403,404,410,416,422],{},[306,405,406,409],{},[266,407,408],{},"Win rate"," — won amount divided by total amount, formatted as a percent.",[306,411,412,415],{},[266,413,414],{},"Variance to target"," — actual minus quota.",[306,417,418,421],{},[266,419,420],{},"Percent of total"," — a column's value against the grand total.",[306,423,424,427],{},[266,425,426],{},"Averages per group"," — one measure divided by another.",[262,429,430],{},"Each derived column gets its own formula, its own number format, and can itself be referenced by later columns. The compare table is where a lens stops being a chart and starts being analysis.",[359,432,434],{"id":433},"pivot-table","Pivot table",[262,436,365,437,440],{},[266,438,439],{},"pivot table"," crosses two dimensions — one down the rows, one across the columns — with the measure in the cells. Stage down the side, quarter across the top, sum of amount in the middle. It's the classic cross-tab, and it's the right answer whenever someone says \"I want it like Excel.\"",[284,442,444],{"id":443},"advanced-saql-mode","Advanced (SAQL) mode",[262,446,447,448,451,452,455],{},"The last icon opens the ",[266,449,450],{},"advanced editor",", showing the ",[266,453,454],{},"SAQL"," the lens has been generating all along. It reads roughly like this:",[457,458,463],"pre",{"className":459,"code":460,"language":461,"meta":462,"style":462},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","q = load \"Opportunities\";\nq = filter q by 'StageName' == \"Closed Won\";\nq = group q by 'Industry';\nq = foreach q generate 'Industry' as 'Industry', sum('Amount') as 'sum_Amount';\nq = order q by 'sum_Amount' desc;\nq = limit q 10;\n","sql","",[464,465,466,474,480,486,492,498],"code",{"__ignoreMap":462},[467,468,471],"span",{"class":469,"line":470},"line",1,[467,472,473],{},"q = load \"Opportunities\";\n",[467,475,477],{"class":469,"line":476},2,[467,478,479],{},"q = filter q by 'StageName' == \"Closed Won\";\n",[467,481,483],{"class":469,"line":482},3,[467,484,485],{},"q = group q by 'Industry';\n",[467,487,489],{"class":469,"line":488},4,[467,490,491],{},"q = foreach q generate 'Industry' as 'Industry', sum('Amount') as 'sum_Amount';\n",[467,493,495],{"class":469,"line":494},5,[467,496,497],{},"q = order q by 'sum_Amount' desc;\n",[467,499,501],{"class":469,"line":500},6,[467,502,503],{},"q = limit q 10;\n",[262,505,506,507,510,511,514,515,518,519,522,523,526],{},"Every clause maps to something you clicked: ",[464,508,509],{},"filter"," is your filter bar, ",[464,512,513],{},"group"," is your bar\u002Fgrouping, ",[464,516,517],{},"foreach ... generate"," is your measures, ",[464,520,521],{},"order"," and ",[464,524,525],{},"limit"," are your sort and query limit.",[262,528,529,530,533,534,537,538,541],{},"You can edit it directly and run it. That unlocks things the point-and-click UI simply cannot express — multi-step queries, ",[464,531,532],{},"cogroup"," to combine two streams from the same dataset, windowing functions for running totals and rank, ",[464,535,536],{},"case"," statements for custom bucketing, and computed measures inside the ",[464,539,540],{},"foreach",".",[341,543,545],{"icon":544},"i-lucide-triangle-alert",[262,546,547,548,551,552,555],{},"Editing SAQL is a ",[266,549,550],{},"one-way door"," for that lens. Once you hand-edit the query, the visual explorer can no longer round-trip it, and you keep working in SAQL from then on. Do your clicking first, get as close as you can, ",[271,553,554],{},"then"," drop into the editor for the last mile.",[284,557,559],{"id":558},"which-mode-when","Which mode, when",[561,562],"lesson-steps",{":items":563},"[{\"title\":\"Start in chart mode\",\"description\":\"You're looking for shape and outliers. If the chart answers the question, you're done.\"},{\"title\":\"Drop to a values table to verify\",\"description\":\"Whenever a number surprises you, look at the raw rows before you believe it or blame the dataset.\"},{\"title\":\"Use a compare table for derived metrics\",\"description\":\"Rates, ratios, variances, percent-of-total — anything that needs a formula across columns.\"},{\"title\":\"Use a pivot table for cross-tabs\",\"description\":\"Two dimensions and one measure, laid out like a spreadsheet, for people who want to read exact values.\"},{\"title\":\"Go to SAQL last\",\"description\":\"When the UI has run out of road, or when you want to learn what it's been writing for you.\"}]",[262,565,566,567,570,571,574],{},"The advanced editor also exposes one thing worth remembering for the next lesson: it shows ",[266,568,569],{},"API names",", not the friendly labels you see in the UI. Which raises the obvious question — where do those labels come from, and how do you change them? That's the ",[266,572,573],{},"Fields"," panel, and it's next.",[576,577,578],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":462,"searchDepth":470,"depth":476,"links":580},[581,582,587,588],{"id":286,"depth":476,"text":287},{"id":353,"depth":476,"text":354,"children":583},[584,585,586],{"id":361,"depth":482,"text":362},{"id":383,"depth":482,"text":384},{"id":433,"depth":482,"text":434},{"id":443,"depth":476,"text":444},{"id":558,"depth":476,"text":559},"A CRM Analytics lens can display the same query three ways — chart mode with the chart picker and formatting panel, table mode (values, compare, and pivot tables), and advanced SAQL mode where you read and hand-edit the generated query.","md",{},{"title":145},{"title":252,"description":589},{"id":595,"start":596,"end":597},"G3NLtd5A1VM",320,445,"6o4yX-1agLcaf9Nm_E2ODfVd2eWsQAd2zrJeB1BvZ_M",[600,602],{"title":141,"path":142,"stem":143,"description":601,"children":-1},"The core moves of a CRM Analytics lens — changing measures, adding groupings and bars, trellis charts, undo\u002Fredo and the history panel, query limits for top-N, and filtering on measures, dates, and dimensions.",{"title":149,"path":150,"stem":151,"description":603,"children":-1},"Use the Fields panel inside a lens to edit a CRM Analytics dataset's metadata — default table columns, dimension labels, per-value colors, and measure number formats including currency — and understand why these changes apply everywhere.",[],1786788922686]