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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
Anonymous
Not applicable

NEXTMONTH() function issue

Dear all,

        I was using the next month function to create a column as Opening Balance. But the same is not getting populated for the latest month in the column. Please refer the screenshot for the DAX used and column Nextmonthissue.png 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

NEXTMONTH returns a table that contains a column of all dates from the next month, based on the first date in the dates column in the current context.  Because your current table does not contain dates from July onwards, the last row appears blank.

 

You can use the following calculated column:

 

 

Opening Bal Cal = EDATE(Sheet[Period Cal],1)

 

 

Capture3.PNG

 

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

 

Best Regards,

Dedmon Dai

View solution in original post

7 REPLIES 7
VijayP
Super User
Super User

@Anonymous 

Change "Period Cal" Data Type to Date and see whether it is working

if this is the solution then mark this as solution and share your Kudos

Regards

Vijay Perepa




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

Dear Vijay, Thanks for the reply but all the columns displayed are in date format and only the frst field Tax Period is in text datatype

@Anonymous 

What should be the latest month in the above example (Result)

The Right function is doing some thing odd!




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

3 rd column is the expected output vijay.

Anonymous
Not applicable

3 rd column is the expected output and 5 th column is the actual output on using the dax. @amitchandak  @Greg_Deckler . It would be great if you could help me. Thanks in advance

Hi @Anonymous ,

 

NEXTMONTH returns a table that contains a column of all dates from the next month, based on the first date in the dates column in the current context.  Because your current table does not contain dates from July onwards, the last row appears blank.

 

You can use the following calculated column:

 

 

Opening Bal Cal = EDATE(Sheet[Period Cal],1)

 

 

Capture3.PNG

 

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

 

Best Regards,

Dedmon Dai

@Anonymous ,

This is 2nd and 3rd column

Period = Date(right([period],4), left([period],2),1)
Opening Balance = eomonth([period],0) +1

 

Hope I got it correctly

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

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.