Ask Search:
Aparna PuvvadaAparna Puvvada 
Hi All,

I have created a Static filter with custom values and created another compare table also,
and i am trying to filter the data in compare table with the Static filter.

for that i am trying to pass the binding code in Compare table level, but i am getting errors.

Please look in to the below and provide the solution for this.

Static filter code:

"Period_1": {
                "broadcastFacet": true,
                "groups": [],
                "label": "Period",
                "numbers": [],
                "selectMode": "single",
                "strings": [],
                "type": "staticflex",
                "values": [
                    {
                        "display": "This Month",
                        "value": [
                            [
                                [
                                    "month",
                                    0
                                ],
                                [
                                    "month",
                                    0
                                ]
                            ]
                        ],
                        "drange": "[\"current month\"..\"current month\"]"
                    },
                    {
                        "display": "This Quarter",
                        "value": [
                            [
                                [
                                    "quarter",
                                    0
                                ],
                                [
                                    "quarter",
                                    0
                                ]
                            ]
                        ],
                        "drange": "[\"current quarter\"..\"current quarter\"]"
                    }
                ]
            }
        },

Compare table code:

"MM_BUD_In_USD_1": {
                "broadcastFacet": true,
                "datasets": [
                    {
                        "id": "0Fbd0000000wz3qCAA",
                        "label": "Margin_Cube_BWP",
                        "name": "BWQ",
                        "url": "/services/data/v42.0/wave/datasets/0Fbd0000000wz3qCAA"
                    }
                ],
                "isGlobal": false,
                "query": {
                    "measures": [
                        [
                            "sum",
                            "MM_BUD_In_USD",
                            "A"
                        ]
                    ],
                    "columns": [
                        {
                            "query": {
                                "measures": [
                                    [
                                        "sum",
                                        "MM_BUD_In_USD"
                                    ]
                                ]
                            }
                        }
                    ],
                    "filters": [
                        [
                            "Period",
                            "{{column(Period_1.selection, [\"Period\"]).asObject()}}",
                            "in"
                        ]
                    ]
                },
                "receiveFacet": true,
                "selectMode": "single",
                "type": "aggregateflex",
                "useGlobal": true,
                "visualizationParameters": {
                    "options": {},
                    "parameters": {
                        "borderColor": "#e0e5ee",
                        "borderWidth": 1,
                        "cell": {
                            "backgroundColor": "#ffffff",
                            "fontColor": "#16325c",
                            "fontSize": 12
                        },

Error screen shot: 
"  This widget can't be displayed because there is a problem with its source step:
The binding 'column(Period_1.selection, ["Period"]).asObject()' contains an error: The column name 'Period' doesn't exist in the data. "
Best Answer chosen by Aparna Puvvada
Akshay AhujaAkshay Ahuja
Hello Aparna,

Could you make the following changes and see if it works:

1. For Static Step, remove 1 pair of square brackets for both 'This Month' and 'This Quarter' values.

"Period_1": {
                "broadcastFacet": true,
                "groups": [],
                "label": "Period",
                "numbers": [],
                "selectMode": "single",
                "strings": [],
                "type": "staticflex",
                "values": [
                    {
                        "display": "This Month",
                        "value": [
                                [
                                    "month",
                                    0
                                ],
                                [
                                    "month",
                                    0
                                ]
                        ],
                        "drange": "[\"current month\"..\"current month\"]"
                    },
                    {
                        "display": "This Quarter",
                        "value": [
                                [
                                    "quarter",
                                    0
                                ],
                                [
                                    "quarter",
                                    0
                                ]
                        ],
                        "drange": "[\"current quarter\"..\"current quarter\"]"
                    }
                ]
            }
        },

2. Change Syntax of Binding code to have value and >=<= as shown below:

"MM_BUD_In_USD_1": {
                "broadcastFacet": true,
                "datasets": [
                    {
                        "id": "0Fbd0000000wz3qCAA",
                        "label": "Margin_Cube_BWP",
                        "name": "BWQ",
                        "url": "/services/data/v42.0/wave/datasets/0Fbd0000000wz3qCAA"
                    }
                ],
                "isGlobal": false,
                "query": {
                    "measures": [
                        [
                            "sum",
                            "MM_BUD_In_USD",
                            "A"
                        ]
                    ],
                    "columns": [
                        {
                            "query": {
                                "measures": [
                                    [
                                        "sum",
                                        "MM_BUD_In_USD"
                                    ]
                                ]
                            }
                        }
                    ],
                    "filters": [
                        [
                            "Period",
                            "{{column(Period_1.selection, [\"value\"]).asObject()}}",
                            ">=<="
                        ]
                    ]
                },
                "receiveFacet": true,
                "selectMode": "single",
                "type": "aggregateflex",
                "useGlobal": true,
                "visualizationParameters": {
                    "options": {},
                    "parameters": {
                        "borderColor": "#e0e5ee",
                        "borderWidth": 1,
                        "cell": {
                            "backgroundColor": "#ffffff",
                            "fontColor": "#16325c",
                            "fontSize": 12
                        },

Note:
"Period" should be the column name you are using to filter the compare table.
Period_1 is step name
value is name given to values that will be used to filter by "Period"

Hope this helps.

Best Regards,
Akshay
madhav Arepallimadhav Arepalli 
I am trying to do a Co-Group on two different datasets and the comon field is OBS and i am trying use the following SAQL query: 

q = load "Upload_File_OBS_v1";
q = group q by ('OBS','Order_ID');
q = foreach q generate q.'OBS' as 'OBS', q.'Order_ID' as 'Order_ID', count(q) as count;
q = order q by ('OBS' asc, 'Order_ID' asc);

q1 = load "Upload_File_Invoice_v2";
q1 = group q1 by ('OBS','Invoice_ID');
q1 = foreach q1 generate 'OBS' as 'OBS','Invoice_ID' as 'Invoice_ID', sum('Invoice_Amount') as 'Invoice_Amount';
q1 = order q1 by ('Invoice_ID' asc, 'OBS' asc);
q1 = limit q1 2000;

q2 = cogroup q by 'OBS', q1 by 'OBS';
q2 = foreach q2 generate q1.'Order_ID' as 'Order_ID', q1.'Invoice_ID' as 'Invoice_ID' , sum(q1.'Invoice_Amount') as 'Invoice_Amount';

Error: 

Unkown IDTOKEN: ORDER_ID


Any help would be appreciated 


Thank you 
Madhav 
Best Answer chosen by madhav Arepalli
Allen CoveyAllen Covey
Your referencing the wrong stream for "ORDER_ID".

Order_ID is in the "q" stream.
Xin ZhangXin Zhang 
Is it an expected behavior that we cannot choose and save an initial seletion when using "Global Filter"? I am able to save initial selection when using "List".
Best Answer chosen by Xin Zhang
Akshay AhujaAkshay Ahuja
Hello Xin,

So that's the difference with Global filters. You don't need to use Pick Initial selection option.
When you go to Edit mode, directly go to the required global filter and set the value (without going to pick initial selection option). Once you select a value, the dashboard will modify based on selection and then you save the dashboard.

You would set an inital value to a regular list filter using "Pick Initial Value". But that doesn't work for Gloabl filters.
Let me know if you have any questions.

Best Regards,
Akshay
Jeff MusgraveJeff Musgrave 
I know there is a sales stage analysis dashboard that comes with wave but I would still like to to be able to add some fields from opportunity history into wave.  I tried adding by using sfdcDigest but the fields I am looking for, such as duration, do not show up under opportunity history.
 
Does anyone know how to add opportunity history fields to an existing dataflow?
Best Answer chosen by Jeff Musgrave
Akshay AhujaAkshay Ahuja
Hello Jeff,

The "Duration" field is created from a compute Expression in the dataflow.
If you have Sales App dashboards enabled, you can refer to it's dataflow to find the compute Expression which creates the field Duration. The basic algorithm for it is:
  • Sort Opportunity History by ID & Created Date
  • Create 2 Date Fields using a Compute Relative node:
    • "Valid From" which is current() of Created Date
    • "Valid To" which is next() of Current Date
  • Create "Duration" uisng a Compute Expression node as date difference between Valid From and Valid To (if both are populated), or Valid From and now (if Valid To is null or set to a default value)
Hope this answers your question.

Best Regards,
Akshay

 
Marek SmerakMarek Smerak 
Data storage limints in Analytics cloud are set as number of data rows used. Also "Analytics license data storage limits are contractual, not technical. Licensee agrees to strictly monitor its total number of data rows". Does anyone know how to check how many rows are we currently using?
Best Answer chosen by Marek Smerak
Naveen DhanarajNaveen Dhanaraj
Hi Marek,
Is this what you want,This was suggested by peter,


User-added image

If not check with Experts Here,
https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000009MBP&fId=0D53A00003Two2v&s1oid=00D300000000iTz&s1nid=0DB30000000072L&emkind=chatterCommentNotification&s1uid=0053000000CV5Vn&emtm=1521631332117&fromEmail=1&s1ext=0 (https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000009MBP)
Lian ChenLian Chen 
In Einstein Analytics, I have a quote dataset with 4,092 record.  When I group by this dataset by Quote Start Date, only the quotes with values in Start Date field are showing in the pivot table.  For the quotes with Start Date as blank, they are not showing up.  How do I make them show in group by result?
Best Answer chosen by Lian Chen
Akshay AhujaAkshay Ahuja
Hello Lian,

You could add a Default Date value to the Start Date field. So all the quotes that previously had a blank value will be grouped under the Default Date.

To add a default date (like 12/31/9999), you could use the dataflow:
Default_Date
Let me know if this works.

Best Regards,
Akshay
Lian ChenLian Chen 
In Einstein Analytics, I've noticed on my Bar Chart, when I group by different fields, I would get different total count. 
User-added imageUser-added image
However, if I group by the same 2 fields in SFDC out-of-box reports, the result of totals are the same.  Any suggest of the cause?
User-added imageUser-added image

BR,
Lian
Best Answer chosen by Lian Chen
Akshay AhujaAkshay Ahuja
Hello Lian,

1. When you Group By "Approval Status", you get 187 records in both Einstein Analytics and SFDC. So that's ✅.

2. When you Group By "OM Approver", you get 184 records in Einstein Analytics and 187 in SFDC. You might want to check the following:
  • Try matching the 8 OM Approver values between Einstein and SFDC. Check if there is an exact match for each of the 8 Approver's i.e. match the values you have written in red (59+41+33+22+19+6+2+2) with the SFDC report.
  • Also, it might be a case that the 3 records in Pending Status are not assigned to any OM Approver. In that case, Einstein Analytics will show only 184 records as the OM Approver might be blank for those records. 
Hope checking all of these points helps you figure out the cause of the discrepancy.

Best Regards,
​Akshay
Jackie LujanJackie Lujan 
Anyone familiar with enabling Analytics in a community?  I have enabled it in settings.  This document also says to add the permission set license and create a permission set for the community members which I can do BUT I have 100+ community members that will need to see a dashboard in our community.  Is there any other way to do this other than add the permission set license and permission set to each individual user?  
https://help.salesforce.com/articleView?id=bi_setup_communities_enable.htm&type=5
Best Answer chosen by Jackie Lujan
Jayson MoralesJayson Morales

Hi Jackie,

Use Data Loader or Workbench to mass assign Permission Set License and Permission Set.

1. Use the object PermissionSetLicense to query the ID of the Permission Set License
2. Use PermissionSetLicenseAssign to mass assign the Permission Set License to users. You need the following the fields - AssigneeId and PermissionSetLicenseId

Use the article below to assign Permission Set to multiple users:

https://help.salesforce.com/articleView?id=perm_sets_mass_assign.htm&type=5

Hope this helps.
 

Ben WebsterBen Webster 
I'm trying to plot a chart with data calculated using a windowing function in SAQL. The windowing function generates several 'sub-rows' for each row of data - how do I control which of these 'sub-rows' gets plotted in a chart? At the moment it automatically plots the first row (e.g. 7 and 5 below), whereas I want it to plot the last rows for each 'Event_Date' entry (6 and 3, below). My SAQL code is:

q = load "CompletedActions";
q = group q by (Id, Event_Date, Event_Type);
q = order q by 'Event_Date';
q = foreach q generate 'Event_Date' as 'Event_Date', sum((case when Event_Type == "Created" then 1 else -1 end)) over ([..0] partition by all order by Event_Date) as 'open actions';SAQL query results
Best Answer chosen by Ben Webster
Akshay AhujaAkshay Ahuja
Hello Ben,

In a bar/ciolumn chart, you should see all the values. In a number widget, as you said it plots only the first field of the first grouping by default. One solution is to sort the "open actions" column in ascending and then refer to the step in a number widget. This would plot 6 on a number widget (from above example)

q = order q by ('Event_Date' asc, 'open actions' asc);

Another way is to add a new column for Row Number using Rank function with Reset Group of Event Date. Once you have the Row Number you can filter based on the first or 2nd row.

row_number() over([..] partition by 'Event_Date' order by sum(A) asc) as 'RowNumber'

Best Regards,
Akshay
Alice JuAlice Ju 
Hi, 
I'm trying to do a field in Wave Dataflow that uses either LeadId.OwnerId or ContactId.OwnerId depending on which one is available. My SAQL epxression in Data flow step is like this. 
case
when ContactId is not null
then 'ContactId.OwnerId'
end

But I kept getting the error below. 

Something went wrong while executing the rename_ContactID_LeadId_to_ContactLeadId node: invalid field expression case;when ContactId is not null;then "Contact";else;"Lead" for field 'ContactLead_Type': Syntax Error at position 60 after token :: ;";else;"Lead"; (02K36000000FA4nEAG_03C360000013N1UEAU)

Can someone kindly help me out? Any help will be appreciated. Thanks! 
Alice
 
Best Answer chosen by Alice Ju
Akshay AhujaAkshay Ahuja
Hello Alice,

Could you try adding the else statement and then running the dataflow. Please find below the updated case statement.

case
when ContactId is not null
then 'ContactId.OwnerId'
else
'LeadId.OwnerId'

end

Hope this resolves your issue.

Best Regards,
Akshay