Meliorainsights.com
  • Home
  • Tableau CRM
  • Blog
  • Non-Profits
  • Our Clients
  • About
  • Trading Studio

​Meliora Insights, LLC

​Data Cloud | CRM Analytics  (TCRM / Einstein Analytics) Consulting
​meliora - 'for the pursuit of the better'


A blog series distilling quantitative concepts /use-cases in CRM Analytics  (Einstein Analytics).

Picture

Adding a results query to drop dynamic initial values into a list selector (instead of relying on 'pick initial values' setting in edit mode of a dashboard

9/26/2022

0 Comments

 
So client wants 2 snapshot dates populated . Snap1 is the most recent snapshot--easy enough to accomplish by a query sorted in ascending order which takes the most recent one and puts it in snap1list selector. The 2nd snapdate is 1 year back. This can be done by populating the 'start' attribute in dashboard JSON with a results from query 'q_oneYrBack_1'.
    "start": "{{cell(q_oneYrBack_1.result,0,\"sd2\").asString()}}"

 "q_oneYrBack_1": {
                "broadcastFacet": true,
                "groups": [],
                "label": "q_oneYrBack",
                "numbers": [],
                "query": "q = load \"zds_completeOpptys_v2\";\nq = filter q by date('SnapshotStamp_Year', 'SnapshotStamp_Month', 'SnapshotStamp_Day') in [\"365 days ago\"..\"365 days ago\"];\nq=  group q by 'SnapshotStamp';\nq = foreach q generate 'SnapshotStamp' as 'sd', substr('SnapshotStamp',2,10) as 'sd2';",
                "receiveFacetSource": {
Sd2 resolved to text in yyyy-MM-dd format (hence the 10 character string in the substr function).
0 Comments



Leave a Reply.

    Archives

    June 2025
    April 2025
    January 2025
    November 2024
    August 2024
    April 2024
    March 2024
    February 2024
    January 2024
    December 2023
    June 2023
    May 2023
    April 2023
    March 2023
    February 2023
    December 2022
    October 2022
    September 2022
    July 2022
    April 2022
    March 2022
    January 2022
    November 2021
    June 2021
    April 2021
    March 2021

Site powered by Weebly. Managed by Hostwinds
  • Home
  • Tableau CRM
  • Blog
  • Non-Profits
  • Our Clients
  • About
  • Trading Studio