google-bigquerylooker-studiolooker

Formula for changing displayed date in looker studio field?


I am quite new into looker studio. I have made a chart that displays data week per week. The dimension used for this is ISO year week. The problem is that I would like the header field to just be Week 51, Week 52..., are there a formula for this or another way?

Image of table

Have tried out several Extract and Truncate combinations, but I think I simply don't understand the formulas well enough to get the solution i expected. Found this formula extracts week but keeps days: EXTRACT(Date FROM DATETIME_TRUNC(Date, WEEK))


Solution

  • It is nice and simple :)

    Add a field called week number and use this formula

    WEEK(YourDateField, 1) 
    

    It calculates the week number, considering Monday as the start of the week (change the number to change the day of the week).

    [![enter image description here][1]][1]

    I get something that looks like this [1]: https://i.sstatic.net/PmFNi.png