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! Request now

Reply
Amp_
Frequent Visitor

Need help with DAX (Month)

Hey! everyone

 

I would like to show 2 month which composed of current month and next month

but i have  begining Value only current month so I would like to cal ending inventory of current month  to be begining of next month

Capture.JPG

I really appreciate your help on this, thank you in advance.

Please let me know if you need more details on above scenario.

 

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @Amp_ ,

 

At first, you need to create a new column.

Rank =
RANKX ( 'Table', 'Table'[Date],, ASC, DENSE )

Then create your “Ending Inventory” column based on it.

End =
CALCULATE (
    MIN ( 'Table'[Begin] ),
    FILTER (
        'Table',
        'Table'[Rank]
            = EARLIER ( 'Table'[Rank] ) + 1
            && 'Table'[Name] = EARLIER ( 'Table'[Name] )
    )
)

Here is the result.

1-1.PNG

 

Best Regards,

Eads

 

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

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

View solution in original post

2 REPLIES 2
v-eachen-msft
Community Support
Community Support

Hi @Amp_ ,

 

At first, you need to create a new column.

Rank =
RANKX ( 'Table', 'Table'[Date],, ASC, DENSE )

Then create your “Ending Inventory” column based on it.

End =
CALCULATE (
    MIN ( 'Table'[Begin] ),
    FILTER (
        'Table',
        'Table'[Rank]
            = EARLIER ( 'Table'[Rank] ) + 1
            && 'Table'[Name] = EARLIER ( 'Table'[Name] )
    )
)

Here is the result.

1-1.PNG

 

Best Regards,

Eads

 

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

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Ani1991
Resolver III
Resolver III

Hi @Amp_ 

It would be very helpful if you could share the required output. 
From what I understood, do you want to sum the Ending Inventory for the month of August and Begin Inventory for September (as per the data shared).

 

Thanks,

Ani

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors