KNOWLEDGE BASE

How to calculate how many half-year is included in date data


Published: 15 Sep 2022
Last Modified Date: 16 Sep 2022

Question

How to calculate how many "half-year" are included in the date data

Example:
In case date data is from 1/1/2021 to 12/31/2022 , then 4 .
 

Environment

  • Tableau Desktop

Answer

It can be calculated using the following calculation.

Calculation : DATEDIFF ( 'month' , MIN( [Date] ) , MAX( [Date ] ) ) / 6

 
Did this article resolve the issue?