Forum Discussion
If with < formula
Hi All,
Please help. For some reason, my date switch month and year every 13th of each month and back again at the begining of month.
correct month=If ([Month]<12,[Day],[Month])
This does not work and only shows [Day] column in new correct month column. Could you please help!
All the best,
Paris
hi paris
Just try this simple formula
CorrectDay = IF([Day]>12,[Day],[Month])CorrectMonth = IF([Day]>12,[Month],[Day])Result:
Regards,
Lin
6 Replies
- amitchandak
Super User
paris , what is expected output
- paris
Helper V
Hallo Amitchandak,
I am sorry I was not clear.
Date is in text format. When I used formular to get day and month, I got them wrong so I want to correct like yellow here.
All the best,
Paris
- ryan_mayu
Super User
Could you please show the expected result in the excel?
newmonth = if('Table'[day]<=12,'Table'[day],if(mod('Table'[day],12)=0,12,mod('Table'[day],12)))I am not sure if I understand your request clearly.
- paris
Helper V
Hi Ryan
Thank you for your response. I am sorry my question was not clear.
Date here is in text format and when I tried to use day and month formular I get wrong data from 1st till 12th of each month.
I like to correct it by creating new column and want to get answer in yellow.
All the best,
Paris
- v-lili6-msft
Community Support
hi paris
Just try this simple formula
CorrectDay = IF([Day]>12,[Day],[Month])CorrectMonth = IF([Day]>12,[Month],[Day])Result:
Regards,
Lin