Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
paris
Helper V
Helper V

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!

 

BI1.JPG

 

All the best,

Paris

1 ACCEPTED SOLUTION

hi  @paris 

Just try this simple formula

CorrectDay = IF([Day]>12,[Day],[Month])
CorrectMonth = IF([Day]>12,[Month],[Day])

Result:

1.JPG

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
ryan_mayu
Super User
Super User

@paris 

 

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.

 

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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. 

Capture3.JPG

All the best,

Paris

 

 

hi  @paris 

Just try this simple formula

CorrectDay = IF([Day]>12,[Day],[Month])
CorrectMonth = IF([Day]>12,[Month],[Day])

Result:

1.JPG

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Lin

Thank you so much for your help!

 

All the best,

Paris

amitchandak
Super User
Super User

@paris , what is expected output

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.

 

Capture3.JPG

 

All the best,

Paris

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors