Questions tagged [saql]

SAQL - Salesforce Analytical Query Language

Filter by
Sorted by
Tagged with
0
votes
2answers
1k views

It is possible to make a sum under some criteria Wave Analytics

I'm stuck with a problem and I want to make a sum only under certain criteria, for example: Add the Total field per month and then take the average of the last 3 months ie sum (total) -> if month = ...
0
votes
1answer
66 views

How to prevent a filter in the UI from affecting one of my tables

I have the following problem. I have a Data Set A in which I have created several charts with their tables. There is a filter panel at the top where any change you make to these filters is reflected ...
2
votes
1answer
531 views

Faceting Not Working Within Dataset - Einstein Analytics

I am editing a dashboard in Einstein Analytics. It contained 5 charts, all from the same datasource, and they all faceted between one another when selections were made. I was asked to change the top ...
2
votes
2answers
294 views

Can complex (Variance) analysis be done in Einstein Analytics?

Background Every month we copy revenue data in our from their original objects (complex normalized tree of related objects) into something we call a snapshot. A denormalized flat table (Custom object)...
1
vote
0answers
43 views

SAQL - Unnest Array to Rows [closed]

Is there a way using SAQL to unnest an array into multiple rows? For example, my output is ['abc', 'def', ghi'] and I would like to end up with 'abc' 'def' 'ghi'
0
votes
1answer
154 views

How to get row with rows salesforce opportunity id from a dataset of Opportunity History(Left) and opportunity(Right)

Below is the SAQL being tried by me. q = load "RELAOpportunityDataset"; q = filter q by 'Opportunity.OpptyRecType.Name' == "RELA Opportunity"; q = foreach q generate q.'Opportunity.Id' as '...
0
votes
1answer
798 views

Conditional Highlighting for Widget in Einstein Analytics

Is it possible to create a conditional highlight in Einstein Analytics I have this following query: q = load "Santher2_new"; result = group q by 'categoria'; result = foreach result generate q.'...
0
votes
2answers
2k views

how to create a bucket field, percentage in wave

Currently I have a dataset that is all opportunities. I generated a dashboard and in there I have report/graph that is all the opportunities grouped by a field called channel__c In salesforce I ...
0
votes
1answer
83 views

CoGrouped Step wont filter other steps

I have the following step built by co-grouping 2 datasets on their SIC codes so that the display shows the sum of Amount for each SIC Code Description. This works as I need it to. q1 = load "...
1
vote
1answer
481 views

SAQL sort without including field in the return results

I need to sort by a field in a SAQL query, but I do not want that field to appear in my results. For example, I am trying to do this q = load "xxx"; q = foreach q generate 'account_id' as '...
0
votes
1answer
634 views

“No results found” data type for Wave

I'm trying to do some basic error handling in SAQL. We have a binding that gives as a result "No result found" both in the SAQL editor and in the actual step. I'm trying to capture the data type of ...
1
vote
2answers
2k views

Using variables in SAQL

I'm trying to basically work with SAQL using some sort of variable. Not sure why every time I do that, I receive an error that the Identifier can't be found. So, let's suppose I want to divide the ...
2
votes
1answer
187 views

Assign bindings to variables

I'm working on a Einstein Analytics project, and I'm trying to get some bindings to be assigned to variables. "q = load \"Dataset\"; _value = foreach q generate ({{cell(S_Amount__1_USD.result, 0, \"...
1
vote
1answer
397 views

How to edit step-calculated metric formats?

When metrics are calculated from a step, and not in the source database, how can the format the calculated metric be edited? Perhaps the JSON or the XMD (where would this live for the calculated ...
1
vote
1answer
4k views

In Wave/Einstein analytics, is it possible to combine query results from 2 different datasets into the same visualization?

I am creating charts/tables on a Wave Dashboard using a small number of datasets that I've created using dataflows and recipes. What I want to do now is to query (i.e., somehow get data) from two of ...
1
vote
1answer
1k views

Analytics Wave - Order by Case Statement

Is it possible to Order a SAQL query using a case statement? We changed CloseDate_Month in to text so it displays as month name instead of month number, but when that's used in the order by, it order ...
0
votes
1answer
684 views

Wave Einstein Analytics filter relative dates in dataflow with filter node

I need to filter opportunities in my dataflow that have a date 'last month' to 'end of current year'. I cannot use filters in the sfdcDigest node as I am doing a couple of calculations later that need ...
0
votes
1answer
1k views

SAQL- How to group by AccountID and report the first value in a table?

I am currently looking to de-duplicate data in a dataset. Reason being, I need to group together all accounts reporting on a criteria, so we may then sum and total the values of each account to get an ...
1
vote
1answer
715 views

SAQL - When I dynamically create dates in SAQL and group them, I can't use the “Timeline” chart

I try to create a timeline chart for every year for products on the market that are started to sell before that year and ended to sell after that year. To get my filtered data I filter them like I ...
1
vote
2answers
3k views

SAQL Using Current year and doing calculations with dates in a Formula Condition

I want to do calculations with dates and use 'current year' in a formula condition. When I tried to manipulate dates in a formula I always receive an error of incompatibles types; NUMBER AND DATE. ...
0
votes
1answer
1k views

SAQL- Wave analytics Convert to number [duplicate]

Is anyone knows how to convert date or string to a number in SAQL? specifically convert this: toString(now(), "yyyy") into number
1
vote
1answer
702 views

Change Time Zone in Wave Dashboard

I am using page 28 of this doc for reference: https://resources.docs.salesforce.com/200/latest/en-us/sfdc/pdf/bi_dev_guide_saql.pdf I need to change the time zone in the step. I am trying to use the ...
1
vote
0answers
103 views

Wave - Using Times as a Group

I am attempting to build a dashboard using times in the format hh:mm:ss AM/PM. I have tried to do this several different ways include adding a date to the time (even though I don't need that because ...
0
votes
4answers
4k views

How to convert decimals to a percentage in Wave Saql query result

I want to show the reuslt with the percentage, what should I do?
0
votes
2answers
688 views

Incompatible types: STRING and NUMERIC

I'm attempting to change the dates on some data within Wave Analytics to get the correct time zone showing, but I'm getting the error "Incompatible types: STRING and NUMERIC" whenever I attempt the ...
0
votes
2answers
367 views

Perform measure calculation with the saql compact form

for the step clause "measures" using the saql compact form, is possible to make arithmetical calculation like sum(AMOUNT)/sum(WEIGHT) without a compare table? The following example explain what i mean:...
2
votes
1answer
637 views

Wave REST API returns BAD REQUEST ERROR 400

public class SendWaveUsingRESTAPI { private final String clientId = 'xxxx'; private final String clientSecret = 'xxx'; private final String username = 'xxxxx'; private final String password = '...
0
votes
1answer
582 views

Concatenation of fields and text in Compact filter

I have this statement in SAQL q = foreach q generate Region, TerritoryRMA, ContactSysId, PurposeTopic, HasActivityFlag, 'Territory'+\"~~~\"+'Flag' as TFlag; q = filter q by TFlag in {{selection(...
3
votes
2answers
2k views

How to find percentage using a single dataset

I am working on SAQL to find Percentage of Leads that has been converted into opportunities. I am working on wave-utils to check my SAQL and I am receiving the following error: Cogroup projection ...
1
vote
2answers
1k views

How to do a simple math on aggregate values from different streams in SAQL?

This should be some basic stuff but lack of good documentation on SAQL is making it hard to figure out. I just want to do a simple math like ths- Avg. Sale Price = Total Sale Price/Qty The filters ...
1
vote
1answer
7k views

Wave Analytics - mixing two datasets

Could Wave Analytics handle the following scenario? I need to get all the Contracts and Accounts (some filtering here) Get all the Cases pointing to Accounts List all the Accounts with cases pointing ...
0
votes
2answers
2k views

SFMC query syntax

Greeting All, New to the SFMC application and have been assigned as the new admin. In some of the queries I am having difficulty understanding the purpose of the syntax and I am hoping someone here ...
2
votes
0answers
153 views

Performance issue when offset used in SAQL

I am using the endpoint data/v35.0/wave/query to execute a SAQL query. When I execute the below SAQL which does not contain offset, I am getting the response approzimately in 1 secs load \"xxxx/xxxx\...
1
vote
0answers
169 views

Analytics - Multiple List Widgets and Raw Data Tables - how to filter on both?

I have a dashboard with two list widgets (Account and Opportunity) and two raw data tables (Opportunity Detail and Order Detail). I have used SAQL to group data and then populate the first table (...
4
votes
2answers
2k views

How to query all rows in a dataset using SAQL

We have a dataset with millions of rows in Salesforce Wave. We want to fetch records using SAQL. We used the below SAQL to get the records. And we executed this SAQL using "services/data/v34.0/wave/...
1
vote
1answer
1k views

Sample dataset and Sample dashboard that uses SAQL

I am trying to use SAQL for my dashboar. But when I specify filter or group in SAQL, the dataset fails to load the bar charts. Below is my step I am using "steps": { "...

1
2