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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.