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
Syndicate_Admin
Administrator
Administrator

Return last data for each month

Hello!!

I have a table where every week they upload some data, and to compare the end of the month, I would need that in the whole page where I show the statistics, there is only the last data of each month of each game ... It's possible?

Thanks a lot!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Syndicate_Admin 

Create a calendar table, relate calendar table with your data table by date columns and then create measures.

Calendar table:

Date = ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]),"Month",MONTH([Date]),"YearMonth",YEAR([Date])*100+MONTH([Date]))

Create a calculated column in Data table.

YearMonth = RELATED('Date'[YearMonth])

2.png

Measures:

Last Date each Month & Game = 
CALCULATE(MAX('Table'[Date]),FILTER(ALL('Table'),'Table'[YearMonth] = MAX('Table'[YearMonth])&&'Table'[Game] = MAX('Table'[Game])))
M_Value = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Date] = [Last Date each Month & Game]))

Result:

1.png

Best Regards,
Rico Zhou

 

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

1 REPLY 1
Anonymous
Not applicable

Hi @Syndicate_Admin 

Create a calendar table, relate calendar table with your data table by date columns and then create measures.

Calendar table:

Date = ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]),"Month",MONTH([Date]),"YearMonth",YEAR([Date])*100+MONTH([Date]))

Create a calculated column in Data table.

YearMonth = RELATED('Date'[YearMonth])

2.png

Measures:

Last Date each Month & Game = 
CALCULATE(MAX('Table'[Date]),FILTER(ALL('Table'),'Table'[YearMonth] = MAX('Table'[YearMonth])&&'Table'[Game] = MAX('Table'[Game])))
M_Value = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Date] = [Last Date each Month & Game]))

Result:

1.png

Best Regards,
Rico Zhou

 

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

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