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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
scorbin
Helper I
Helper I

How to create a matrix showing the value of each row at the End of Month?

I am trying to create a matrix that shows the count of employees in each department at the end of every month. So I have something that looks like this:

scorbin_0-1643392884281.png

This would be basic example with employee count showing the total employees in that department for that day. I have data for every day of the year. I also have a separate date table if that helps. 

 

I would like to create a matrix with the department being the rows, the date being the columns, and empolyee count at the end of the month for each department as the values. How might I go about doing this? 

1 ACCEPTED SOLUTION

Ah, yes, if you have multiple lines for the same date, just change it to:

 

EOM Employee Count = 
CALCULATE (
    MAX ( Data[Employee Count] ),
    Data[Date] IN VALUES ( Dates[End Of Month] )
)

 

if you want the row with the highest employee count. 


Are you good? Do you need anything else on this one?

View solution in original post

4 REPLIES 4
SteveHailey
Solution Specialist
Solution Specialist

Hello @scorbin.

 

Since you already have a date table and data in your fact table for every day, you could:

Create a new End Of Month column, if you don't have this column already, in your date table:

 

End Of Month = EOMONTH( Dates[Date], 0 )

 


Create a new measure:

 

EOM Employee Count = 
CALCULATE (
    SUM ( Data[Employee Count] ),
    Data[Date] IN VALUES ( Dates[End Of Month] )
)

 


And use the new End Of Month column in your matrix columns, and your new measure in your matrix values:

SteveHailey_2-1643397866790.png

I created a .pbix file here that you can download if it's helpful.

-Steve

It looks like this half worked? I used the EoM column, but I think due to my actual data table being more complex and including multiple lines for the same date and count it would just sum the lines for that date. However, using just the regular count set to Max seemed to work. 

Ah, yes, if you have multiple lines for the same date, just change it to:

 

EOM Employee Count = 
CALCULATE (
    MAX ( Data[Employee Count] ),
    Data[Date] IN VALUES ( Dates[End Of Month] )
)

 

if you want the row with the highest employee count. 


Are you good? Do you need anything else on this one?

Yes! It looks good now. Thanks!

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.