Forum Discussion
If Statement with two different data types
- 9 years ago
I found that the solution is to go under "OPTIONS">Data Load, and uncheck "Automatically detect column types and headers for unstructured sources". This automatically converts everything to text and allows you to select the data type for each column.
What if I am trying to change a calendar date to a fiscal year date, e.g. Oct 1, 2021 is the first month of 2022. Using the following formula, I get expresstions that yield variant data type cannot be used to dafine calculated columns.
- Ashish_Mathur4 years agoSuper User
Hi,
Try these calculated column formulas in the Calendar Table
Month number = month(calendar[date])
Fiscal Year = if(calendar[month number]>10,year(calendar[date])+1,year(calendar[date]))
Hope this helps.
- Anonymous4 years agoNot applicable
Thank you very much, Ashish. I appreciate your help.
- Ashish_Mathur4 years agoSuper User
You are welcome.