Custom Fiscal Week (Monday to Sunday) in Wave Analytics (Salesforce Einstein Analytics)
https://success.salesforce.com/ideaView?id=0873A000000E4d2QAC q = load “GR_Opportunities”; q = foreach q generate ‘CloseDate_day_epoch’ as ‘CloseDate_day_epoch’, ‘CloseDate_sec_epoch’ as ‘CloseDate_sec_epoch’, ‘Id’ as ‘Id’, ‘StageName’ as ‘StageName’, daysBetween(toDate(“24-06-1985”, “dd-MM-yyyy”), toDate(CloseDate_sec_epoch)) % 7 as ‘datediff’; q= foreach q generate (case when datediff == 6 then (case when daysBetween(now(), toDate(CloseDate_sec_epoch))>=-6 and daysBetween(now(), toDate(CloseDate_sec_epoch))<=0 then “CurrentWeek” else “OtherWeek” end) when datediff == …
Custom Fiscal Week (Monday to Sunday) in Wave Analytics (Salesforce Einstein Analytics) Read More »