Looker Studio: Difference between revisions
Jump to navigation
Jump to search
Gregpaskal (talk | contribs) Created page with "{{: Header_Nav}} Looker Studio is a data visualization tool that can pull data in from many sources. This Wiki entry is to capture working with Looker Studio. *Datalake - Google Cloud Platform" |
Gregpaskal (talk | contribs) No edit summary |
||
| (17 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
Looker Studio is a data visualization tool that can pull data in from many sources. This Wiki entry is to capture working with Looker Studio. | Looker Studio is a data visualization tool that can pull data in from many sources. This Wiki entry is to capture working with Looker Studio. | ||
*[[ | *[https://lookerstudio.google.com/ Looker Studio] | ||
== Code Samples == | |||
=== Case - [https://cloud.google.com/looker/docs/studio/case-simple more...] === | |||
<syntaxhighlight lang="javascript" line="1"> | |||
CASE | |||
WHEN testStepDurationMS = 0 THEN null | |||
ELSE testStepDurationMS * 0.001 | |||
END | |||
CASE | |||
WHEN CONTAINS_TEXT(LOWER(testStepResult), "pass") THEN "Pass" | |||
WHEN CONTAINS_TEXT(LOWER(testStepResult), "fail") THEN "Fail" | |||
WHEN CONTAINS_TEXT(LOWER(testStepResult), "skip") THEN "Skip" | |||
END | |||
</syntaxhighlight> | |||
=== Concatenation - [https://cloud.google.com/looker/docs/studio/concat?visit%20id=638889681685168930-3176560615&rd=1 more...] === | |||
<syntaxhighlight lang="javascript" line="1"> | |||
CONCAT(locLatitude, ", ", locLongitude) | |||
CONCAT( | |||
testCaseName, | |||
CASE | |||
WHEN testCaseRepetition > 0 THEN CONCAT(" - Repetition ", testCaseRepetition, " of ", testCaseRepetitions) | |||
ELSE "" | |||
END | |||
) | |||
CONCAT( | |||
SUBSTR(CONCAT("00", CAST(testCaseRepetition AS TEXT)), -2, 2), | |||
".", | |||
SUBSTR(CONCAT("00", CAST(testStepRefOrder AS TEXT)), -2, 2) | |||
) | |||
</syntaxhighlight> | |||
=== Count - [https://cloud.google.com/looker/docs/studio/count more...] === | |||
<syntaxhighlight lang="javascript"> | |||
COUNT(CASE WHEN testStepExecuted = FALSE THEN 1 END) | |||
COUNT(CASE WHEN testStepResult = "Fail" THEN 1 END) | |||
COUNT(CASE WHEN testStepResult = "Pass" THEN 1 END) | |||
COUNT(CASE WHEN testStepExecuted = FALSE THEN 1 END) | |||
</syntaxhighlight> | |||
=== Current Date - [https://cloud.google.com/looker/docs/studio/currentdate more...] === | |||
<syntaxhighlight lang="javascript"> | |||
CURRENT_DATE() | |||
</syntaxhighlight> | |||
=== If Else - [https://cloud.google.com/looker/docs/studio/if more...] === | |||
<syntaxhighlight lang="javascript"> | |||
IF(LENGTH(testStepScreenshotRef) > 0, HYPERLINK(testStepScreenshotRef, "View"), "") | |||
</syntaxhighlight> | |||
Latest revision as of 13:39, 24 July 2025
|
What can we help you find? |
Random | ||||||||||||||||
| Home | Testing | Automation | AI | IoT | OS | RF | Data | Development | References | Tools | Wisdom | Inspiration | Investing | History | Fun | POC | Help |
Looker Studio is a data visualization tool that can pull data in from many sources. This Wiki entry is to capture working with Looker Studio.
Code Samples
Case - more...
CASE
WHEN testStepDurationMS = 0 THEN null
ELSE testStepDurationMS * 0.001
END
CASE
WHEN CONTAINS_TEXT(LOWER(testStepResult), "pass") THEN "Pass"
WHEN CONTAINS_TEXT(LOWER(testStepResult), "fail") THEN "Fail"
WHEN CONTAINS_TEXT(LOWER(testStepResult), "skip") THEN "Skip"
ENDConcatenation - more...
CONCAT(locLatitude, ", ", locLongitude)
CONCAT(
testCaseName,
CASE
WHEN testCaseRepetition > 0 THEN CONCAT(" - Repetition ", testCaseRepetition, " of ", testCaseRepetitions)
ELSE ""
END
)
CONCAT(
SUBSTR(CONCAT("00", CAST(testCaseRepetition AS TEXT)), -2, 2),
".",
SUBSTR(CONCAT("00", CAST(testStepRefOrder AS TEXT)), -2, 2)
)Count - more...
COUNT(CASE WHEN testStepExecuted = FALSE THEN 1 END)
COUNT(CASE WHEN testStepResult = "Fail" THEN 1 END)
COUNT(CASE WHEN testStepResult = "Pass" THEN 1 END)
COUNT(CASE WHEN testStepExecuted = FALSE THEN 1 END)Current Date - more...
CURRENT_DATE()If Else - more...
IF(LENGTH(testStepScreenshotRef) > 0, HYPERLINK(testStepScreenshotRef, "View"), "")