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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
M_SBS_6
Helper V
Helper V

Month End Values

 

Hi, I have a list of data that comes into us everyday, Monday to Friday. What I need to show is the values based on the last date we have each month. 
 
My table as an example:
 

Date.          Type.  Name. Product Value

01/12/24.   YT.       Macron. Coat.    50
01/12/24.   DA.       Macron Gillet.     30
01/12/24.   DA.      Macron. T-shirt.  10
01/12/24.   YT.       Nike. Coat.    90
01/12/24.   DA.      Nike.  Gillet.    70
01/12/24.   DA.      Nike. T-shirt.  20
……..
31/12/24.   YT.       Macron. Coat.    55
31/12/24.   DA.       Macron Gillet.     20
31/12/24.   DA.      Macron. T-shirt.  5
31/12/24.   YT.       Nike. Coat.    100
31/12/24.   DA.      Nike.  Gillet.    80
31/12/24.   DA.      Nike. T-shirt.  20
 
So my measure would return the values for Macron £80 for December and £210 for Nike as they’re the latest values for month end. 
 
The problem is, the months all have a different end date so not too sure what to do but if I want to track the month end position on a line chart to show the trend, I’m not sure how to do it. Anyone know please? 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @M_SBS_6 

 

For your question, here is the method I provided:

 

Here's some dummy data

 

“Table”

 

vnuocmsft_1-1737097750261.png

 

Create a new column, [YearMonth], containing the year and month.

 

YearMonth = FORMAT('Table'[Date], "YYYY-MM")

 

Create a measure to extract the last date of each month.

 

LastDateOfMonth = 
CALCULATE(
    MAX('Table'[Date]),
    ALLEXCEPT('Table', 'Table'[YearMonth])
)

 

Create two measures to calculate the totals of "Nike" and "Macron" respectively.

 

Nike TotalValueAtMonthEnd = 
CALCULATE(
    SUM('Table'[Value]),
    FILTER(
        'Table',
        'Table'[Date] = 'Table'[LastDateOfMonth]
        &&
        CONTAINSSTRING('Table'[Name], "Nike")
    )
)

 

Macron TotalValueAtMonthEnd = 
CALCULATE(
    SUM('Table'[Value]),
    FILTER(
        'Table',
        'Table'[Date] = 'Table'[LastDateOfMonth]
        &&
        CONTAINSSTRING('Table'[Name], "Macron")
    )
)

 

Here is the result.

 

vnuocmsft_2-1737098364305.png

 

Regards,

Nono Chen

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

2 REPLIES 2
Anonymous
Not applicable

Hi @M_SBS_6 

 

For your question, here is the method I provided:

 

Here's some dummy data

 

“Table”

 

vnuocmsft_1-1737097750261.png

 

Create a new column, [YearMonth], containing the year and month.

 

YearMonth = FORMAT('Table'[Date], "YYYY-MM")

 

Create a measure to extract the last date of each month.

 

LastDateOfMonth = 
CALCULATE(
    MAX('Table'[Date]),
    ALLEXCEPT('Table', 'Table'[YearMonth])
)

 

Create two measures to calculate the totals of "Nike" and "Macron" respectively.

 

Nike TotalValueAtMonthEnd = 
CALCULATE(
    SUM('Table'[Value]),
    FILTER(
        'Table',
        'Table'[Date] = 'Table'[LastDateOfMonth]
        &&
        CONTAINSSTRING('Table'[Name], "Nike")
    )
)

 

Macron TotalValueAtMonthEnd = 
CALCULATE(
    SUM('Table'[Value]),
    FILTER(
        'Table',
        'Table'[Date] = 'Table'[LastDateOfMonth]
        &&
        CONTAINSSTRING('Table'[Name], "Macron")
    )
)

 

Here is the result.

 

vnuocmsft_2-1737098364305.png

 

Regards,

Nono Chen

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

speedramps
Super User
Super User

I am happy to help but please provide data as table that we can import.

I dont want to faff reformatting your text data. Thank you

 

You can do this using the table icon

or better still save the data with read access on Onedrive, Dropbox or Google and post the url link here

speedramps_0-1736965390783.png

 

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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