0

I have two separate datasets that have no ID's related between them, other than a "Dealer Name" field that is mostly identical between the two.

How can I use a filter list to filter both datasets at the same time?

    "steps": {
        "Dealer__c_1": {
            "type": "aggregateflex",
            "isFacet": true,
            "useGlobal": false,
            "isGlobal": false,
            "selectMode": "single",
            "query": {
                "groups": [
                    "Dealer__c"
                ],
                "measures": [
                    [
                        "count",
                        "*"
                    ]
                ]
            },
            "datasets": [
                {
                    "name": "Written_Data",
                    "url": "/services/data/v38.0/wave/datasets/0Fb1a000000UPhyCAG",
                    "id": "0Fb1a000000UPhyCAG"
                }
            ]
        },
        "Invoice_Date__c_Year_2": {
            "type": "aggregateflex",
            "visualizationParameters": {
                "visualizationType": "hbar",
                "options": {}
            },
            "query": {
                "groups": [
                    "Invoice_Date__c_Year"
                ],
                "measures": [
                    [
                        "sum",
                        "Total_MVP_Sale__c"
                    ]
                ]
            },
            "datasets": [
                {
                    "name": "Invoice_Data",
                    "url": "/services/data/v38.0/wave/datasets/0Fb1a000000UPi3CAG",
                    "id": "0Fb1a000000UPi3CAG"
                }
            ],
            "isFacet": true,
            "isGlobal": false,
            "useGlobal": true
        },
        "Invoice_Date__c_Year_1": {
            "type": "aggregateflex",
            "visualizationParameters": {
                "visualizationType": "hbar",
                "options": {}
            },
            "query": {
                "groups": [
                    "Invoice_Date__c_Year"
                ],
                "measures": [
                    [
                        "sum",
                        "Sell_Price__c"
                    ]
                ]
            },
            "datasets": [
                {
                    "name": "Written_Data",
                    "url": "/services/data/v38.0/wave/datasets/0Fb1a000000UPhyCAG",
                    "id": "0Fb1a000000UPhyCAG"
                }
            ],
            "isFacet": true,
            "isGlobal": false,
            "useGlobal": true
        }
    },
0

I was also stuck in same kind of issue and I found a solution through SAQL. I am sharing my SAQL queries with you. Here I have load two(2) different data set i.e Account and Opportunity and based on AccountID I have co-group these two data set. Because it is necessary to have at least 1 field having same value in both data-set and in my case only Account id is same. For Account object field name is Id and for Opportunity object it is AccountId.

Example 1:

Acc = load "0Fb28000000L640CAC/0Fc280000012mLtCAI";
Opp = load "0Fb28000000L63vCAC/0Fc280000012mMDCAY";
b = cogroup Acc by Id, Opp by AccountId;
Result = foreach b generate sum(Acc.NumberOfEmployees) as 'Number of Employees';

Example 2:

Acc = load "0Fb28000000L640CAC/0Fc280000012mLtCAI";
Opp = load "0Fb28000000L63vCAC/0Fc280000012mMDCAY";
b = cogroup Acc by Id, Opp by AccountId;
Result = foreach b generate count(Opp) as 'Total Opportunity', count(Acc) as 'Total Account' ;   
| improve this answer | |
0

To do this - you need a Selection Binding -

Have a look at - https://www.andrewprice.me/blog/the-ultimate-bindings-20-from-bindings-10-guide

There is Salesforce Documentation for the new Bindings Syntax, but also examples in the code examples that show you Selection Bindings.. Check out the documentation as it will go into detail what a Selection Binding is.

Thanks

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.