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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
TeamCanada26__
Frequent Visitor

If Statement with a Calculation

I am trying to create a Fiscal calendar that is particular to our company. 

 

I have the transaction year and the transation month, what I am looking to do is to create a new calculated column that would add 1 to a the year if the associated month is > 8.  

 

essentially, this is what I would like:

IF [year] > 8 then ([year]+1), [year]

 

Thank you.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Please follow below steps 

 

1. In power query create a new column 

Transaction Date +1 = Date.AddYears([Transaction date],1)

2. In visual write below dax

New Transaction date = if(MONTH('Table'[Transaction date])>8,'Table'[Transaction Date +1],'Table'[Transaction date])

 

Please confirm if it works..!!

 

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Please follow below steps 

 

1. In power query create a new column 

Transaction Date +1 = Date.AddYears([Transaction date],1)

2. In visual write below dax

New Transaction date = if(MONTH('Table'[Transaction date])>8,'Table'[Transaction Date +1],'Table'[Transaction date])

 

Please confirm if it works..!!

 

 

Thank you - I would need the new year in a column on its own. 

I do get the idea behind this - so thank  you for that. 🙂

Step 2 woudl be to create a new column based i guess. 

 

Anonymous
Not applicable

Hi,

Another way using DAX without creating a new column in Power query

 

Create a column with below dax

New Transaction date = if(MONTH('Table'[Transaction date])>8,IFERROR(DATE(YEAR('Table'[Transaction date])+1, MONTH('Table'[Transaction date]), DAY('Table'[Transaction date])), BLANK()),'Table'[Transaction date])
 
Hope this helps 🙂
 
Anonymous
Not applicable

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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