• Chandradeep Mishra
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 7
    Replies
I am facing an issue with Tableau CRM (Einstein Analytics) SQAL :
 
I have data like that two columns like that
 
StageName       Value      FScore
 
Qualified            166        0.7108433734939759
Quoted               118       0.6271186440677966
Committed          74        0.2
Closed Lost          4        0.25
Closed Won          1        -
 
I have to fetch the FSCore following basis :
 
Qualified =  Quoted / Qualified            
Quoted=  Committed / Quoted
Committed  =   closed won /(closed won + closed lost)   [ only change for committed]
Closed Lost   =  Closed Won / Closed Lost      
Closed Won   =   null      
 
I have achieved the FScore using the following SAQL using compare table:
 
q = load "Pipeline_Data_Latest";
result = group q by 'Stage_Name' ;
result = foreach result generate q.'Stage_Name' as 'Stage_Name',
sum(q.'Opportunity_Count') as 'A',
(
case when  q.'Stage_Name'=="Committed" then
                   
(sum(sum(q.'Opportunity_Count')) over ([2..3] partition by all order by sum(q.'Opportunity_Count') desc)
/ (sum(sum(q.'Opportunity_Count')) over ([1..3] partition by all order by sum(q.'Opportunity_Count') desc)))
else
(sum(sum(q.'Opportunity_Count')) over ([1..1] partition by all order by sum(q.'Opportunity_Count') desc) / (sum(sum(q.'Opportunity_Count')) over ([0..0] partition by all order by sum(q.'Opportunity_Count') desc)))
end  
) as 'FinalScore',
(
case when  q.'Stage_Name'=="Committed" then
(sum(sum(q.'Opportunity_Count')) over ([2..3] partition by all order by sum(q.'Opportunity_Count') desc)
/ (sum(sum(q.'Opportunity_Count')) over ([1..3] partition by all order by sum(q.'Opportunity_Count') desc)))
else
(sum(sum(q.'Opportunity_Count')) over ([1..1] partition by all order by sum(q.'Opportunity_Count') desc) / (sum(sum(q.'Opportunity_Count')) over ([0..0] partition by all order by sum(q.'Opportunity_Count') desc)))
end    
) as 'FinalScoreNew'
;
result = order result by ('A' desc);
result = limit result 2000;
 
working fine but issue is with when the position is being changed from that place i.e.
 
StageName       Value      FScore
Qualified            166        0.7108433734939759
 
Quoted               118       0.6271186440677966
 
Committed          74        (Gives wrong result)
 
Closed Won          1        .25
 
Closed Lost          4        -
 
so question is that I am not able to get only value for Closed Won and Closed Lost row so that it will be fixed for row based value. I have tried to fetch using the another result set but was not able to do so. even I was wondering how filtering is possible with windowing function plus how to use foreach or strem output in another strem or foreach. Please suggest.
Hi ,

I am trying to Embed Analytics Dashboards in Lightning Pages, what I am facing issue when I try to pass the dynamic filter / selection from lighting page to my listselector_2 or step a value but it does not do anything:
I have a step on the Analytics Dashboards :
 "EmbedTesting_1": {
                "broadcastFacet": true,
                "datasets": [
                    {
                        "id": "0Fb2S0000004Gm1SAE",
                        "label": "test",
                        "name": "test",
                        "url": "/services/data/v49.0/wave/datasets/0Fb2S0000004Gm1SAE"
                    }
                ],  
"isGlobal": false,
                "label": "EmbedTesting",
                "query": {
                    "values": [
                        "user_Name__c",
                    ],
                    "filters": [
                        [
                            "user_Name__c",
                            [
                                ".Ronald .Zahn"
                            ],
                            "in"
                        ]
                    ]
                },

I have embedded this page to contact lighting and trying to give following json so that it should pick contact name and show the embedded dashboard values based on contact: (it shows red line at   "EmbedTesting_1" )

{"steps" : {
  "EmbedTesting_1": [
      {
        "metadata": {"filters": ["user_name__c"]},
        "values": ["$Name"]
      }
    ]
  }
}

can you help me what is I am doing wrong here or suggest me somthing. What I want to achieve to get the contact id or name should pass the above step or list selector selection.
Hi,

I am trying to update SAQL and table based on the ListSelector which is a dropdownlist but unable to get the updated details: can you suggest what wrong I am doing :

"query": "q = load \"TestTable\";\r\nq = filter q by \"{{cell(listselector_1.selection, 0, \"value\").asEquality(\"user_full_name__c\")}}\";\r\nq = foreach q generate \r\n'user_full_name__c' as 'user_full_name__c', \r\n'job_title__c' as 'job_title__c', \r\n'Company' as 'Company__c', \r\n'Industry__c' as 'Academy_User__c.Industry__c', \r\n'Profession__c' as 'Profession__c';\r\nq = limit q 20;\r\n",

This is how list is binded with query  " getUsrList_1
 "query": "q = load \"TestTable\";\nq = group q by 'user_full_name__c';\nq = foreach q generate 'user_full_name__c' as 'user_full_name__c', count() as 'count';\nq = order q by 'user_full_name__c' asc;\nq = limit q 2000;",

I want to bing the table which is bind with first query and as I select any thing from list selctor it should update the table1 query and update the data.


 
what I want to do to recommend the students top 10 related coure(s) based on their company, jobTitle, profession n industry and the attended courses. (3 objects have different datas)

This is same as to display top 10 movies to a user on movies site or dvd purchase site based on user(s) different parameters. can you suggest any thing in Einstein platform.
I want to delete the "acquired accounts" listed but can't find it under object manager.  Any tips?

I am getting space storage full in my developer org.
Hi,

I am facing two issue while deploying story on object, I have two issue(s) : One when I try to deploy on the object the story it shows given window and we are not able to map the fields (which is supposed to be autofill). Even list is so long that we are not able to move down os look other options.

Error Screenshot

Second Isue: After deploying the story I am not able to see the prediction variable in that case maximize the employee sal is not displaying on the Service Console as it should. can you help me on this ? both issue is very critical for me.
 
Hi,

can it be possible to save / insert data from dataset from einstein analytics to custom objects in salesforce.

For example I have created an dataset from object of salesforce and perform something on data and now updated dataset, I want to save / insert records to custom salesforce object or any other object. 

it this possible ?
 
Hi,

any example with Apex Batch with Custom objects & Apex Queuable with Custom object. where you can show iteration on object of custom and update/insert some values.
global class TriggerMyJob implements Database.Batchable<Sobject>
{
 
    global Database.QueryLocator start(Database.batchableContext bc)   
    {   
        Integer count = Limits.getLimitQueryRows() - Limits.getQueryRows();
        System.debug('---result 1 ' + count );
        string query = 'SELECT Id, Academy_User_FullName__c, Academy_User_CompanyName__c, Academy_User_job_title__c, Academy_User_Profession__c, Academy_User_IndustryAcademy_User_Indust__c , Webinar_Name__c, Registrations__c FROM EnrollmentCPA__c';
        system.debug(Database.getQueryLocator(query));
        //add code to display the result.
        Database.QueryLocator q = Database.getQueryLocator([SELECT Id, Academy_User_FullName__c, Academy_User_CompanyName__c, Academy_User_job_title__c, Academy_User_Profession__c, Academy_User_IndustryAcademy_User_Indust__c , Webinar_Name__c, Registrations__c FROM EnrollmentCPA__c]);
        // Get an iterator
        Database.QueryLocatorIterator it =  q.iterator();
        return q;
 }  
    
    global void execute(Database.batchableContext info, List<EnrollmentCPA__c> scope)    
    {
      System.debug('tsting' + scope);
    }
    
    global void finish(Database.BatchableContext bc){   }    
}
Following is hte screen
User-added image
following code is not working and fails at the execute method which are bold, Kindly suggest how to resolve this as working with custom object and I have tried wtih QueryLocator  and followed the article :
<https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm>

global class TriggerMyJob implements Database.Batchable<Sobject>
{
 
    global Iterable<sObject> start(Database.batchableContext bc)   
    {   Integer count = Limits.getLimitQueryRows() - Limits.getQueryRows();
        System.debug('---result 1 ' + count );
            return [SELECT Id, Academy_User_FullName__c, Academy_User_CompanyName__c, Academy_User_job_title__c, Academy_User_Profession__c, Academy_User_IndustryAcademy_User_Indust__c , Webinar_Name__c, Registrations__c FROM EnrollmentCPA__c limit :count];     
    }  
    
    global void execute(Database.batchableContext info, List<sObject> scope)    
    {
         for(sObject renObj : scope)
        {

            Id results = renObj.Id;
            //IPfolio__Renewal__c result=renObj.Id;
            //System.debug(renewal.Id);
            System.debug('---result---'+results);
        }
    }
    
    global void finish(Database.BatchableContext bc){   }    
}
Hi,

I Need recommendation in salesforce one of my object whcih is called userRegistration and I want to recommend the registered User for course(s) he can more enrol based on all users's columns company, Job title, Industry and registrations for the coruses. I tried pridiction but it is not giving me recomedation based on the string parameters. can you suggest any thing.
Hi,

I have data like that

Xyz  4
Xyz  4
Xyz  4
Xyz  4
AB  5
AB  5
CD  6
YD  4

I want to group by and do sum only for the distinct rows and divide each with sum. for example :
            avg would
Xyz 4   
AB  5  
CD  6
YD  4
sum 19 and avg would be 
Xyz  4  4/19
Xyz  4  4/19
Xyz  4  4/19
Xyz  4  4/19
AB  5  5/19
AB  5  5/19
CD  6  6/19
YD  4  4/19

help me on this



 
Hi,

I am facing an issue where I need to perform following nested loop (for Each ):

Scenario : we have a table named t1 :
we want to iterate all the rows of the table and compare two columns of the T1 and base on this perofrm some logic to get new data for Einstein, can you please let me know is that possible ?

for(T1__c inObj : snapList)
 {
     for(T1__c inObj : snapList)
   {   Based on two columns maching if both columns have identical values create three new columns for each rows.
}
}
I want to delete the "acquired accounts" listed but can't find it under object manager.  Any tips?

I am getting space storage full in my developer org.
Hi,

any example with Apex Batch with Custom objects & Apex Queuable with Custom object. where you can show iteration on object of custom and update/insert some values.
Hi,

I am facing an issue where I need to perform following nested loop (for Each ):

Scenario : we have a table named t1 :
we want to iterate all the rows of the table and compare two columns of the T1 and base on this perofrm some logic to get new data for Einstein, can you please let me know is that possible ?

for(T1__c inObj : snapList)
 {
     for(T1__c inObj : snapList)
   {   Based on two columns maching if both columns have identical values create three new columns for each rows.
}
}