Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [saql]

SAQL - Salesforce Analytical Query Language

Filter by
Sorted by
Tagged with
-1 votes
0 answers
6 views

Customize list filter

I have a list filter in dashboard there I have around 50 values. Now out of 50 there are five values which ‘Japan 20’, ‘Japan20’, ‘Japan2020’, ‘Japan-20’, ‘Japan_20’. Now in list filter I want to ...
user avatar
  • 99
0 votes
1 answer
45 views

Getting the Error Code: 6'101 when using Connected Objects for my TCRM Recipe

I am testing a recipe that accesses the data from "connected objects" instead of a data set, selected only necessary columns. I performed sync of objects a few hours before. Getting the ...
user avatar
0 votes
1 answer
25 views

I want to add Sub Total using SAQL Query

Region Sector Notes Count of Rows America FI Client Choice 2 Entry 8 **Sub Total 10** MI Rotation 45 Data Source 30 **Sub Total 75** **Sub Total 85** I have the above table which shows Sub ...
user avatar
0 votes
0 answers
84 views

sfdx-mohanc-plugins error

I'm getting Error: yarn add sfdx-mohanc-plugins@latest --non-interactive --mutex=file:C:\Users\User-S\AppData\Local\sfdx\yarn.lock --preferred-cache-folder=C:\Users\User-S\AppData\Local\sfdx\yarn --...
user avatar
0 votes
0 answers
17 views

SAQL/Analytics - Finding unique customer count over time

I am trying to put together a simple line graph representing the total number of customers that have purchased a specific product over time. I would like to create a graphical representation of the ...
user avatar
  • 1
0 votes
0 answers
26 views

How can I use a global dashboard filter in a SAQL Query?

If I have a global filter on a dashboard (e.g. Account_Name), is it possible to reference that filter in a SAQL query something like: q = load "My_data_recipe"; q = filter q by 'Account_name'...
user avatar
0 votes
0 answers
16 views

Editing messy SAQL - adding bindings

I have an interesting challenge on my hands. The solution I'm implementing required editing the SAQL in order to implement some subtotaling that isn't supported by the WYSIWYG... Having done that, I ...
user avatar
1 vote
0 answers
104 views

How to Hide Part of the X-Axis (Time Axis) in Bar Chart Tableau CRM?

I have a question about X-Axis in charts in Tableau CRM (Einstein Analytics). I created a Time Combo chart with 3 calculations through a time line from 2019 to 2021. Amount the three calculations: the ...
user avatar
0 votes
0 answers
12 views

Bar Segment total not matching in Einstein Analytics

I have the dashboard below that shows the rolling sum of opportunities per month (current month plus next 11 ones) But when i use the bar segments to divide it between opportunity types (Above the ...
user avatar
  • 1
0 votes
0 answers
12 views

Create Dataset of Account with or without contacts in Einstein Salesforce

I have created a dataflow where I pull accounts and contacts and apply a augment such that Contact having left source with Key Account.Id while Account having right source with Key Id. Now I am able ...
user avatar
0 votes
0 answers
9 views

Divide by non grouped field in a grouped query

I am trying to create a line graph that shows the breakdown of insights created broken down by week and grade per FTE. The FTE is held in a separate dataset and whenever I can't us the same cogroup as ...
user avatar
0 votes
0 answers
41 views

SAQL - Why is "limit" not applied to ungrouped aggregation?

I have a very basic chart component with the following SAQL: q = load "AllOpps"; q = group q by all; q = foreach q generate sum('Amount') as 'sum_Amount'; q = order q by 'sum_Amount' desc; q ...
user avatar
  • 942
1 vote
0 answers
137 views

SAQL computeExpression with date_diff() or daysBetween() and values that may be null

I have a dataflow with a computeExpression step where I want to define the number of days between two datetime fields. The SAQL expression below executes correctly, however in instances where my ...
user avatar
  • 3,604
0 votes
1 answer
349 views

Tableau CRM: How to add dynamic "date" via computeExpression?

in my dataflow I have a computeExpression that should add a "Date" field. That date field should always contain the first of the current month (e.g. for right now: Feb. 1st 2021). I've tried ...
user avatar
  • 942
0 votes
1 answer
365 views

How to calculate date difference using two separate data rows?

I'm using the LiveChatTranscriptEvent object to try and determine the time difference between the events ChatRequest and TransferredToQueue. Each Type is a different row on the object so it would ...
user avatar
0 votes
1 answer
645 views

How to join/cogroup by multiple fields in SAQL?

I am new to SAQL and am trying to join two datasets (let's call them q and r) using cogroup. I have 4 columns in each table (let's call these A, B, C and D). Columns A - C are the same in both ...
user avatar
0 votes
2 answers
185 views

In SAQL, what's the equivalent of the SQL keyword "HAVING"?

The SQL keyword HAVING is used like a WHERE clause except that HAVING works on aggregated groups. Is there a way to do this in SAQL? Gracias.
user avatar
  • 1
1 vote
0 answers
122 views

Help needed with SAQL fill()

I need your help with the fill() SAQL function. I have created the query below and it runs, but the fill() doesn't work (no zeros get inserted). Please let me know what I am doing wrong here. Thank ...
user avatar
  • 11
1 vote
0 answers
41 views

SAQL: How to count yes/no responses to chatbot question

I've been using Salesforce for less than two months and EA less than one. Requirement: I need to create a report that answers the question, "What is the client feedback on the chatbot?" Data:...
user avatar
0 votes
1 answer
59 views

Dynamic SAQL Wave Analytics

I'm trying to use IN operator in my SAQL dynamically while doing callout using rest API. If I'm trying to use hardcoded in operator it’s working. Working: q = filter q by 'Category' in ["...
user avatar
0 votes
1 answer
459 views

Using SAQL to place total at bottom of results instead of alphabetically ordered

I have a SAQL Query which takes a list and attempts to display a total row at the bottom. However, the way that my code is written is causing the Total column to be alphabetically rearranged so that ...
user avatar
0 votes
1 answer
702 views

How to include a row with subtotals by second level group in Einstein Analytics using SAQL?

I would like to add a subtotal row at the bottom of a compare table in an Einstein Analytics dashboard. The table is made up of sums of measures grouped by two dimensions. The subtotals needed are ...
user avatar
  • 1
0 votes
1 answer
319 views

Get derived date dimension year or month

I'm creating a derived date dimension in SAQL and wanted to find out if there was any way to get the year or month (or day or quarter) parts from it? Normally, adding an "_year" to the end ...
user avatar
  • 623
0 votes
1 answer
463 views

Filter records not in other query results - SAQL

I am starting to work with einstein analytics and SAQL and I already searched on internet before posting this question but I couldn't find an answer to my problem. I need help to know how can I ...
user avatar
0 votes
1 answer
201 views

OR Condition in JSON filter Wave analytics Dashboard

I have a json filter in lightning record page for a Analytics dashboard. There are conditions where Code1__c will be NULL or Code2__c will be NULL . Is there any mechanism in JSON filter where we can ...
user avatar
  • 1,516
0 votes
1 answer
488 views

multiply two fields in group by SAQL

I have this below SAQL. What i want in end result is sum(q_A.'Revenue' * q_A.'Opportunity.Probability')/100) for each month basically Revenue is OpportunityLineSchedule field and Probability is ...
user avatar
  • 1,516
0 votes
1 answer
322 views

Monday Morning Challenge: Join two data streams with SAQL in Salesforce Einstein Analytics

I do have two data streams q1 and q2. I want to merge q2.SUM into q1 if they both have the same value in MaxMon. It looks so obvious, but I am lost in between all this cogroup and union magic. This ...
user avatar
  • 13
0 votes
1 answer
374 views

Need to get the most recent CaseHistory record for the particular date(Created Date) in the einstein analytics

I have the table like this:- CaseNumber CaseHistory Created Date 005 oo1 09/02/2020 002 10/02/2020 006 003 ...
user avatar
1 vote
1 answer
196 views

Multiple SAQL queries in Apex cause You have uncommitted work pending

I am trying to use SAQL queries in Apex and trying to execute following logic in my developer console. It gives me uncommitted work pending error which we basically get during a DML before a callout. ...
user avatar
0 votes
1 answer
1k views

Is there a way to perform an inner query in SAQL/einstein anaylitics

I need to query all activities for each account that I have an activity on. I am using the activities dataset from the activity capture. In SQL it would be SELECT activityid, account.name, account....
user avatar
0 votes
1 answer
730 views

ComputeRelative sum in EinsteinAnalytics

In a ComputeRelative node I try to sum up the values of a grouping. I tried to use sum('parameter'), but it gives me the error Something went wrong while executing the computeRelative xxx node: ...
user avatar
0 votes
1 answer
119 views

Show derived measure in aggregate bar chart

I want to show a bar chart with list of opportunities and total days it took to close the opportunity. I tried the below query q = load "DTC_Opportunity_SAMPLE"; q = foreach q generate '...
user avatar
0 votes
2 answers
2k views

How to bucket field values in Einstein analytics

I have a dataset with a field as Order Country. It has field values as 'AUS', 'USA', 'GBR', 'IND', 'KEN', etc. Now, is there any way to bucket these values as bucket 1: 'AUS', 'USA', 'GBR' - Total ...
user avatar
  • 131
1 vote
1 answer
1k views

Is it possible to group by a unique field but display a non-unique one with SAQL?

I'm a SAQL beginner and I'm currently trying to modify an errant dashboard in Einstein Analytics that I did not create. The dashboard contains a step that currently groups by Account Name and sums the ...
user avatar
0 votes
1 answer
74 views

Generate previous work day

I want to display sales from yesterday but the company is close Saturday and Sunday. So when the day is Monday I need to return Friday sales. But if the day is Tuesday I can return Monday sales. Is ...
user avatar
  • 83
1 vote
1 answer
336 views

Formatting a derived measure that was calculated from multiple datasets

I understand how to format a derived measure using the XMD. But here, my derived measure comes from multiple datasets. Here is my SAQL: q = load "Dataset1"; q = group q by all; q = foreach q ...
user avatar
0 votes
1 answer
256 views

saql create bar segments

I would like to create stacked bar based on something a saql query like this: q = load "datasetname"; q = filter q by 'field1' == "false" and 'field2'=="homescreen"; q = filter q by date('...
user avatar
1 vote
0 answers
386 views

calculate time difference between status changes for Order History

Scenario We keep orders information into Salesforce and we have our own statuses too, whenever the order status changes in our Ecom system it updates that into Salesforce. I can get the timings via ...
user avatar
1 vote
1 answer
778 views

SAQL calculate average case close rate for einstein

Scenario So I want to display average case closing rate(for now in minute) on dashboard. What I've done So if I'm not wrong I can calculate the difference time like (closed date - created date) ...
user avatar
1 vote
0 answers
103 views

Global variable using SAQL

Can global variables be used with SAQL? How can I see the value of the global variables in Wave Analytics?
user avatar
1 vote
1 answer
425 views

SAQL Date format conversion

I am pulling in a date field from a secondary (Japan) SFDC org into our native org. The format in the Japan org shows it as just a date (yyyy-MM-dd) but when I look at the date in the data connection ...
user avatar
2 votes
0 answers
68 views

Is it possible to save/persist data from an Einstein Dataset back to Salesforce?

We are building a Lightning application that will be used to show Einstein consolidated data to users. We want to either consume this data directly from Einstein (we know we can do that with Wave SDK ...
user avatar
  • 143
1 vote
1 answer
1k views

Analytics Facet issue - Syntax Error after token ) :: ilter q by (());

I have a SAQL step in my dashboard that goes something like this: q = load "aDataset"; q = filter q by 'A__c' == "true" && !('B__c' >= "-"); q = filter q by '...
user avatar
  • 5,213
0 votes
2 answers
551 views

Replace null values in JSON

I'm using a compare table and some values in my datasets doesn't exists. So when I'm trying to calculate the percentage between two rows I got no values. For example I got this image : In the forst ...
user avatar
  • 83
0 votes
1 answer
538 views

preconfigure filter affecting widget with disabled apply global filters

I have embedded a wave dashboard on a visualforce page. In my dashboard I have charts that "Apply global filters is disabled". What happen is when I view the dashboard on the visual force page, and ...
user avatar
0 votes
1 answer
301 views

Bind the Result of one dataset to an another

I have two steps. One with my Holidays group by years and month created with a single dataset with one column "Holidays" with all date of holidays in 2018 and 2019. The second one is my Amount per ...
user avatar
  • 83
0 votes
1 answer
833 views

Filter Dataset with only Work Days

I would like to get the days from Monday to Friday (except holidays) in my SAQL queries. For now I only have Opportunity dataset with Amount and all rows related to CloseDate (Date, Year, Month, Day, ...
user avatar
  • 83
1 vote
1 answer
2k views

Salesforce Analytics Dataflow - Aggregating datasets?

Assume I have a dataset like such: Cart Data ---------- oId cId iId $$ 1 C1 . 2 1 C1 . 3 1 C2 . 3 2 C1 . 1 3 C2 . 3 3 C3 . 4 4 c4 . 5 4 c4 . 5 5 c2 . 4 6 ...
user avatar
0 votes
1 answer
42 views

Get number of CloseDate_Day in a group of CloseDate_Month

I want to get the sum of Amount of the company per month (CloseDate_Month) and divide this sum by the number of CloseDate_Day in this month. q = load "Test"; q = group q by 'CloseDate_Month'; q = ...
user avatar
  • 83
-1 votes
1 answer
283 views

SAQL to find the remaining days in the year?

I want to found the count of days remaining in the year in SAQL . q= foreach q generate daysbetween(toDate(date_to_epoch(year_start_day))-now()) as 'daysRemaining' I want apply formula 365-now() in ...
user avatar
  • 29