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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

how to create a measure that shows only data from the last month

I have some data that shows starting date from a list of employees, I created a chat that shows the headcount split by deparment but I want to refec

2 REPLIES 2
Anonymous
Not applicable

Hi  @Anonymous  ,
According to your description, I create this data:

v-yangliu-msft_0-1612744622969.png

Here are the steps you can follow:

Scene:

Calculate the amount of group A and group B last month

1. Create measure to calculate the amount of group AB.

Group_Month = CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[Month]=MAX('Table'[Month])&&'Table'[Group]=MAX('Table'[Group])))

Result:

v-yangliu-msft_1-1612744622972.jpeg

2. Create measure to calculate the amount of group A and group B last month

last_month =
IF(MAX('Table'[Month])=MONTH(TODAY())-1,'Table'[Group_Month],BLANK())

Result:

v-yangliu-msft_2-1612744622974.jpeg

 

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

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

amitchandak
Super User
Super User

@Anonymous , I doubt question is not complete .

 

Based on title, you can have measure like

measure =
var _max = eomonth(allselected(Table, Table[Date]),0)
return
calculate(countrows(table), filter(Table, eomonth(Table[Date],0) =_max))

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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