Skip to main content
I have an opportunities dataset which has an SQL date per row. I'm trying to roll this up to the account level so that I can take the min(SQL date) per account and track that on a timeline chart. I have the roll up correct and the chart itself is displaying fine, but only as a line and not a timeline chart:

 

This is my SAQL:

 

 

q = load "opportunity";

q = filter q by 'Record_Type_Name__c' == "New Business";

q = filter q by 'SQLDate__c_sec_epoch' != 0;

q = group q by 'Account.Name';

q = foreach q generate 'Account.Name' as 'Account Name', min('SQLDate__c_sec_epoch') as 'SQL Date';

q = foreach q generate 'Account Name' as 'Account Name', toString(toDate('SQL Date'),"yyyy") as 'SQLDate_Year',toString(toDate('SQL Date'),"MM") as 'SQLDate_Month';

q = group q by ('SQLDate_Year', 'SQLDate_Month');

q = foreach q generate 'SQLDate_Year' + "~~~" + 'SQLDate_Month' as 'SQLDate_Year~~~SQLDate_Month',unique('Account Name') as 'SQL Accounts';

q = limit q 2000;

 

Is my only option to move this date logic to a dataflow/recipe? This is just 1 visual that I need and I'd rather not go thorugh the whole process of creating a separate dataset. 
1 answer
0/9000