
After creating a table with dates I added a group binding to switch between weeks, months and quarters. See the screenshot below:
This is my SAQL query:
"query":
"q = load \"DTC_Opportunity_SAMPLE\";\n
result = group q by {{cell(Static_4.selection,0,\"value\").asGrouping()}};\n
result = foreach result generate {{row(Static_4.selection,[], [\"value\"]).asProjection()}}, count(q) as 'Count', sum(q.'Column1') as '#', sum(q.'Amount') as 'Amount';\n
result = limit result 2000;\n\n",
The static step:
"Static_4": {
"broadcastFacet": true,
"label": "Static",
"selectMode": "singlerequired",
"type": "staticflex",
"values": [
{
"display": "Week",
"value": "Created_Date_Week"
},
{
"display": "Month",
"value": "Created_Date_Month"
},
{
"display": "Quarter",
"value": "Created_Date_Quarter"
}
]
},
I need to replace the date numbers with names but I don't know where to place the code to get that.
...foreach q generate (case when 'Created_Date_Month' in ["01"] then "January" when 'Created_Date_Month' in ["02"] then "February" when...
Any ideas? is that possible?
Thanks in advance,
Hi Ignacio,
Sorry for the inconvenience. In case you don't receive a response here, may I also suggest joining the Developer group below to collaborate with the experts for best practice and advice.
https://developer.salesforce.com/forums
https://salesforce.stackexchange.com/
Hope this helps.