Skip to main content
IGNACIO GANCEDO 님이 #Einstein Analytics에 질문했습니다
Hi everyone,

 

After creating a table with dates I added a group binding to switch between weeks, months and quarters. See the screenshot below:

 

Group Binding using custom dates

 

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,
답변 1개
0/9000