• Matt Bostrom
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 4
    Replies
Hello I have some filters (not global filters just selections) on my Wave Dashboard. I can bind these values across different data sets no problem but only if the values are not dates. Once they are Dates I am not able to find a way to bind them successfully.

my filter step looks like this:
"opty_close_date_filter_step": {
                "broadcastFacet": true,
                "datasets": [
                    {
                        "id": "0Fb1a000000IIfwCAG",
                        "label": "Company Opportunities",
                        "name": "Company_Opportunities",
                        "url": "/services/data/v43.0/wave/datasets/xxxxxxx"
                    }
                ],
                "isGlobal": false,
                "query": {
                    "measures": [
                        [
                            "count",
                            "*"
                        ]
                    ],
                    "groups": [
                        "CloseDate_Year",
                        "CloseDate_Month"
                    ]
                },
                "receiveFacet": true,
                "selectMode": "single",
                "type": "aggregateflex",
                "useGlobal": true,
                "visualizationParameters": {
                    "options": {}
                }
then the step that refers to the lead dataset with the ConvertedOpportunityId.CloseDate looks like this:
"converted_leads_step": {
                "broadcastFacet": true,
                "datasets": [
                    {
                        "id": "xxxxxx",
                        "label": "Company Leads",
                        "name": "Company_Leads1",
                        "url": "/services/data/v43.0/wave/datasets/xxxxxx"
                    }
                ],
                "isGlobal": false,
                "label": "Converted Leads",
                "query": {
                    "measures": [
                        [
                            "count",
                            "*"
                        ]
                    ],
                    "filters": [
                        [
                            "IsConverted",
                            [
                                "true"
                            ],
                            "in"
                        ],
                        [
                            "Owner_Zone__c",
                            "{{column(region_filter_step.selection,[\"Opportunity_Owner_Zone__c\"]).asObject()}}"
                        ],
                        [
                            "ConvertedOpportunityId.StageName",
                            "{{column(stage_filter_step.selection,[\"StageName\"]).asObject()}}"
                        ],
                        [
                            "ConvertedOpportunityId.CloseDate",
                            "{{column(opty_close_date_filter_step,[\"CloseDate\"])).asDateRange()}}"
                        ]
                    ]
                },
But once I add that last part about the CloseDate its not working. I have read through these articles and tried many different things with no luck yet:
https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_bindings.meta/bi_dev_guide_bindings/bi_dashboard_bindings_functions_wave_designer_asDateRange.htm
https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_bindings.meta/bi_dev_guide_bindings/bi_dbjson_relative_dates.htm

Does anyone have any ideas?
 
I am using SAQL to get some percentages for the marketing team to show them converted leads and leads in stage 1, stage 2.

its working... however one of the formulas is to take the total leads qualified and divide that by the total leads created. this works until the user starts using the global filters and filtering on the Lead Status field.

is there a way to load a dataset into SAQL and ignore the global filters just for 1 metric in the SAQL? but apply the global filters to the other variable? the catch here is that we want to allow marketing to change the results based on lead create date (QTD, YTD, etc.) but we want to ignore the Lead Status filter they may have applied to the dashboard in the global filter.

SAQL code is below:
leads = load "Company_Leads"; qualified = filter leads by 'Status' == "Qualified" && 'IsConverted' == "false"; qualified = group qualified by all; qualified = foreach qualified generate count() as 'count_qualified'; leads = group leads by all; leads = foreach leads generate count() as 'count_all'; q = group leads by all full, qualified by all; q = foreach q generate sum(leads['count_all']) as 'count_all', sum(qualified['count_qualified']) as 'count_qualified'; q = foreach q generate coalesce('count_qualified' / 'count_all', 0) as 'sum_percent';

 
so i know how to update the "Default Salesforce Dataflow" by downloading and uploading the JSON. question is how can i create a new dataflow (named something appropriate to the data sets being updated). i see for the sales wave apps salesforce has done this. i'd like to separate them vs. having one giant long and always on-going default data flow. so how can i do this?
Hi all,
I'm looking for an efficient way at filtering out some of the emails that come in to our Email Service Address so that it will not auto-create a case in SFDC if its from a particular email.

I am aware there is an Email to Case premium module but am not interested in paying for more that.

I've tried varous things like putting addError on the before insert of the EmailMessage (however this throws email exceptions and also won't work in bulk as it rolls back all DMLs and not just the ones with the errors).

I've also tried triggers on Case and EmailMessages to perform some checks and updates/deletes. That was working but has some problems on its own so I'd rather not continue down that path.
hi all,
within a trigger we are adding an error to the record if it meets certain criteria (validation rule won't work in this case so we are forced to do it this way):

object.addError('message here');

this is working fine and erroring out as designed. However this also generates an email exception. In this case we do not want an email exception generated. We have tried TRY/CATCH blocks but it seems that a validation rule with onError isn't being caught and handled in this case. Any ideas how we can suppress this just for this 1 block of code?
so i know how to update the "Default Salesforce Dataflow" by downloading and uploading the JSON. question is how can i create a new dataflow (named something appropriate to the data sets being updated). i see for the sales wave apps salesforce has done this. i'd like to separate them vs. having one giant long and always on-going default data flow. so how can i do this?
Hi,
In Wave, I been unsuccessful filtering a step (chart widget) from one dataset with date information from a step in another dataset.
I'm using a selection binding and attempting to bind using the compact format and not the SAQL(pigql) format.
Does anyone have an idea of what I might be missing?
Thanks.

Below is a snippet of the JSON that I have:
Source (date) step:
"TradeCreateDate__c_Y_1": {
                "datasets": [
                    {
                       ...snip...
                    }
                ],
                "isFacet": true,
                "isGlobal": false,
                "label": "",
                "query": {
                    "measures": [
                        [
                            "count",
                            "*"
                        ]
                    ],
                    "groups": [
                        "TradeCreateDate__c_Year"
                    ]
                },
                "selectMode": "single",
                "type": "aggregateflex",
                "useGlobal": false,
                "visualizationParameters": {
                    "options": {}
                }
            },


Target step:
"prod_by_strat_1": {
                "datasets": [
                    {
                        ...snip...
                    }
                ],
                "isFacet": true,
                "isGlobal": false,
                "label": "prod by strat",
                "query": {
                    "measures": [
                        [
                            "sum",
                            "TradeAmount__c"
                        ]
                    ],
                    "groups": [
                        "Test_Mo.StrategistName"
                    ],
                    "filters": [
                       ...snip...
                        [
                            "TradeCreateDate__c",
                            "{{row(TradeCreateDate__c_Y_1.selection, [0], [\"min\",\"max\"]).asObject()}}"
                        ]
                    ],
                    "order": [
                        [
                            -1,
                            {
                                "ascending": false
                            }
                        ]
                    ]
                },
                "selectMode": "single",
                "type": "aggregateflex",
                "useGlobal": true,
                "visualizationParameters": {
                    "visualizationType": "hbar",
                    "options": {}
                }
            }

 

I am trying to binding Profile_2 and CreatedDate_LastLogi_1 and when i select a month in the top chart i get no result. I have the binding working when i select bottom chart. the top chart readjusts. Can someone advise on how to get this binding working correctly. I need to keep the SAQL queries the same, so this is why I am using the asEquality filter to pass the data through without disrupting the calculations. 

User-added image
User-added image
        "layouts": [],
        "steps": {
            "CreatedDate_LastLogi_1": {
                "datasets": [
                    {
                        "id": "0Fbw0000000g5TRCAY",
                        "label": "E3CasesUserswithTarget",
                        "name": "E3CasesUserswithTarget",
                        "url": "/services/data/v39.0/wave/datasets/0Fbw0000000g5TRCAY"
                    }
                ],
                "isFacet": true,
                "isGlobal": false,
                "query": {
                    "pigql": "q = load \"E3CasesUserswithTarget\";\nq = filter q by date('CreatedDate_Year', 'CreatedDate_Month', 'CreatedDate_Day') in [\"1 year ago\"..\"current year\"];\nq = filter q by 'User.c_User_Region__c' in all;\nq = filter q by {{column(User_c_User_Region___1.selection,[\"User.c_User_Region__c\"]).asEquality(\"User.c_User_Region__c\")}};\n\nq = filter q by {{column(Profile_2.selection, [\"User.GT.Name\"]).asEquality(\"User.GT.Name\")}};\nq = filter q by 'User.GT.Name' in all;\nq = group q by ('CreatedDate_Year', 'CreatedDate_Month');\nq = foreach q generate 'CreatedDate_Year' + \"~~~\" + 'CreatedDate_Month' as 'CreatedDate_Year~~~CreatedDate_Month', unique('CreatedById') as 'unique_CreatedById';\n\n\nr = load \"UsersGlobalTemplate\";\nr = filter r by 'LastLoginDate_Year' in all;\nr = filter r by 'c_User_Region__c' in [\"Continental Europe\"];\nr = foreach r generate 'LastLoginDate_Year' + \"~~~\" + 'LastLoginDate_Month' as 'LastLoginDate_Year~~~LastLoginDate_Month', unique('Id') as 'unique_Id';\n\ns = cogroup q by 'CreatedDate_Year~~~CreatedDate_Month', r by 'LastLoginDate_Year~~~LastLoginDate_Month';\ns = foreach s generate q.'CreatedDate_Year~~~CreatedDate_Month' as 'CreatedDate', r.'LastLoginDate_Year~~~LastLoginDate_Month' as 'LastLoginDate', sum(q.unique_CreatedById) as 'Active Users', sum(r.unique_Id) as 'User base';\ns1 = group s by ('CreatedDate','LastLoginDate');\ns1 = foreach s1 generate s.'CreatedDate' as 'CreatedDate', s.'LastLoginDate' as 'LastLoginDate', sum(sum(s.'Active Users')) over([..] partition by s.'CreatedDate') as 'CreatedBy', sum(sum(s.'User base')) over([..] partition by all) as 'Total Users';\ns2 = foreach s1 generate s1.'CreatedDate' as 'CreatedDate', s1.'LastLoginDate' as 'LastLoginDate', s1.'CreatedBy' as 'CreatedBy', round((s1.'Total Users'/ s1.'Total Users') * 100,0) as 'Total Users %', round((s1.CreatedBy / s1.'Total Users') * 100,2) as '%';",
                    "measures": [
                        [
                            "count",
                            "*",
                            "%"
                        ]
                    ],
                    "groups": [
                        "CreatedDate"
                    ]
                },
                "selectMode": "single",
                "type": "aggregateflex",
                "useGlobal": true,
                "visualizationParameters": {
                    "options": {}
                }
            },
            "Profile_2": {
                "datasets": [
                    {
                        "id": "0Fbw0000000g5TRCAY",
                        "label": "E3CasesUserswithTarget",
                        "name": "E3CasesUserswithTarget",
                        "url": "/services/data/v39.0/wave/datasets/0Fbw0000000g5TRCAY"
                    }
                ],
                "isFacet": true,
                "isGlobal": false,
                "query": {
                    "pigql": "q = load \"E3CasesUserswithTarget\";\nq = filter q by 'User.c_User_Region__c' in [\"Continental Europe\", \"North America\", \"UK&I\"];\nq = filter q by {{column(User_c_User_Region___1.selection,[\"User.c_User_Region__c\"]).asEquality(\"User.c_User_Region__c\")}};\n\nq = filter q by {{column(CreatedDate_LastLogi_1.selection, [\"CreatedDate\"]).asEquality(\"CreatedDate\")}};\nq = group q by 'User.GT.Name';\nq = foreach q generate 'User.GT.Name' as 'User.GT.Name', unique('CreatedById') as 'unique_CreatedById';\n\nr = load \"UsersGlobalTemplate\";\nr = filter r by 'c_User_Region__c' in [\"Continental Europe\", \"North America\", \"UK&I\"];\nr = filter r by {{column(CreatedDate_LastLogi_1.selection, [\"LastLoginDate\"]).asEquality(\"LastLoginDate\")}};\nr = group r by 'GT.Name';\nr = foreach r generate 'GT.Name' as 'GT.Name', unique('Id') as 'count';\n\n\ns = cogroup q by 'User.GT.Name', r by 'GT.Name';\ns = foreach s generate q.'User.GT.Name' as 'Profile', r.'GT.Name' as 'Profile1', sum(q.unique_CreatedById) as 'Active Users', sum(r.'count') as 'User base';\ns1 = group s by ('Profile','Profile1');\ns1 = foreach s1 generate s.'Profile' as 'Profile', sum(sum(s.'Active Users')) over([..] partition by s.'Profile') as 'Total', sum(sum(s.'User base')) over([..] partition by s.'Profile1') as 'Total Users';\ns2 = foreach s1 generate s1.Profile as 'User.GT.Name', round((s1.'Total Users'/ s1.'Total Users') * 100,0) as 'Total Users %', round((s1.'Total' / s1.'Total Users') * 100,2) as '% Profiles Creating Cases';\n",
                    "measures": [
                        [
                            "count",
                            "*",
                            "% Profiles Creating Cases"
                        ]
                    ],
                    "groups": [
                        "User.GT.Name"
                    ],
                    "filters": [
                        [
                            "User.GT.Name",
                            "{{column(lens_1.result, [\"User.GT.Name\"]).asObject()}}"
                        ]
                    ]
                },
                "selectMode": "single",
                "type": "aggregateflex",
                "useGlobal": true,
                "visualizationParameters": {
                    "options": {}
                }
            },
            "lens_1": {
                "datasets": [
                    {
                        "id": "0Fbw0000000g5TRCAY",
                        "label": "E3CasesUserswithTarget",
                        "name": "E3CasesUserswithTarget",
                        "url": "/services/data/v39.0/wave/datasets/0Fbw0000000g5TRCAY"
                    }
                ],
                "isFacet": true,
                "isGlobal": false,
                "query": {
                    "values": [
                        "Origin",
                        "User.c_User_Region__c",
                        "Days_Open__c",
                        "Case_Age__c",
                        "CreatedDate",
                        "Id",
                        "Priority",
                        "Record_Type__c",
                        "SLA_Status__c",
                        "Status",
                        "Type",
                        "User.Name",
                        "User.GT.Name"
                    ]
                },
                "type": "grain",
                "useGlobal": true,
                "visualizationParameters": {
                    "visualizationType": "valuestable",
                    "options": {}
                }
            },
            "User_c_User_Region___1": {
                "datasets": [
                    {
                        "id": "0Fbw0000000g5TRCAY",
                        "label": "E3CasesUserswithTarget",
                        "name": "E3CasesUserswithTarget",
                        "url": "/services/data/v39.0/wave/datasets/0Fbw0000000g5TRCAY"
                    }
                ],
                "isFacet": true,
                "isGlobal": false,
                "query": {
                    "measures": [
                        [
                            "count",
                            "*"
                        ]
                    ],
                    "groups": [
                        "User.c_User_Region__c"
                    ],
                    "filters": [
                        [
                            "User.c_User_Region__c",
                            [
                                "Continental Europe",
                                "North America",
                                "UK&I"
                            ],
                            "in"
                        ]
                    ]
                },
                "selectMode": "single",
                "type": "aggregateflex",
                "useGlobal": true,
                "visualizationParameters": {
                    "visualizationType": "hbar",
                    "options": {}
                }
            }
        },
Hi all,
I'm looking for an efficient way at filtering out some of the emails that come in to our Email Service Address so that it will not auto-create a case in SFDC if its from a particular email.

I am aware there is an Email to Case premium module but am not interested in paying for more that.

I've tried varous things like putting addError on the before insert of the EmailMessage (however this throws email exceptions and also won't work in bulk as it rolls back all DMLs and not just the ones with the errors).

I've also tried triggers on Case and EmailMessages to perform some checks and updates/deletes. That was working but has some problems on its own so I'd rather not continue down that path.
We have created a Data set and lens in wave analytics
The requirement is to view all records in lens in wave. When we click on "View Data Table".
There is limit for 100 records. Is there any way to increase the Record count or its an platform limitation?
  • June 30, 2015
  • Like
  • 1