IMPORTANT: Convert this field to TEXT if not automatically converted. DAY(Date)Ĭomparison Period Concat: We need to concatenate our comparison date pieces together into a single string. Again I’m using the * character to keep it unique from any existing Day fields. CASE WHEN Month*='1' THEN '01' WHEN Month*='2' THEN '02' WHEN Month*='3' THEN '03' WHEN Month*='4' THEN '04' WHEN Month*='5' THEN '05' WHEN Month*='6' THEN '06' WHEN Month*='7' THEN '07' WHEN Month*='8' THEN '08' WHEN Month*='9' THEN '09' ELSE Month* ENDĭay*: Similar to the Month* field, we need to Day* to create our final comparison date. Month**: Data Studio is kind of dumb, so we need to convert any Month* values that are single digits to double digits. ![]() I’m using the * character to denote that this is a custom field in case Month already exists in your dataset. Month*: We need this field to create our final date. Previous Year: This will convert our current year to our previous year (e.g. Ideally we could do this in 1 formula, but Data Studio is very particular with what it will allow you to do in 1 formula, so let’s create the following fields: You can also return date type using TODATE() function.We will need to use a variety of formulas to create this ‘Comparison Date’ field. Generally you can produce number output such as day, month, minute, second quarter etc using Google Data Studio date functions. What you can do using Google Data Studio date functions?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |