Looker Studio calculated field – Remaining number of days until the end of the month
January 18, 2021
- by Mehdi Oudjida
The Looker Studio (ex Google Data Studio) calculated field below returns the remaining number of days until the end of the month of a specific date.
Remaining days until the end of the month
DATE_DIFF(
DATE(YEAR(Date), MONTH(Date)+1, 0 )
,
Date
)
-
Explanations of the formula step by step
- Create a date (line 2) using
– the year of the date,
– the month after the month of the date,
– 0 as day to get the day just before the first day of the month - Calculate the difference between the result of the 1st step and your date dimension
- Create a date (line 2) using