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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi!
I'm struggling to get a matrix on my dashboard that shows the last project that an employee has been assigned.
For this I have two tables. The first one is Employee, that has IDEmployee, NameEmployee and other data, and a second table Projects, with fields IDProject, IDEmployee, ProjectName, ProjectClient, ProjectMonth (an integer), etc.
So, one Employee is asigned to differents projects. I have built a matrix on my dashboard with the list of all employees and other data from this table and then I tried to add the ProjectName choosing Last, but this has returned the last by name sorted, so not necessary is the last project that the employee had been assigned.
I need the last record added or last project based on current month. If the employee doesn't have any project this month, it should return null or blank.
Thank you for your help in advance!
Solved! Go to Solution.
Hi, @paulorojog ;
You could modify it .
Last client =
var _table=SUMMARIZE(FILTER('NSR',EOMONTH([Periodo],0)=EOMONTH(TODAY(),0)),[Numero Profesional])
return IF(NOT( MAX('Dotación'[Nº pers.])) in _table ,BLANK(),
CALCULATE(max(NSR[Cliente]),LASTNONBLANK('Calendar'[Date],CALCULATE(max(NSR[Cliente])))))Last project =
var _table=SUMMARIZE(FILTER('NSR',EOMONTH([Periodo],0)=EOMONTH(TODAY(),0)),[Numero Profesional])
return IF(NOT( MAX('Dotación'[Nº pers.])) in _table ,BLANK(),
CALCULATE(max(NSR[Texto]),LASTNONBLANK('Calendar'[Date],CALCULATE(max(NSR[Texto])))))
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @paulorojog ;
You could modify it .
Last client =
var _table=SUMMARIZE(FILTER('NSR',EOMONTH([Periodo],0)=EOMONTH(TODAY(),0)),[Numero Profesional])
return IF(NOT( MAX('Dotación'[Nº pers.])) in _table ,BLANK(),
CALCULATE(max(NSR[Cliente]),LASTNONBLANK('Calendar'[Date],CALCULATE(max(NSR[Cliente])))))Last project =
var _table=SUMMARIZE(FILTER('NSR',EOMONTH([Periodo],0)=EOMONTH(TODAY(),0)),[Numero Profesional])
return IF(NOT( MAX('Dotación'[Nº pers.])) in _table ,BLANK(),
CALCULATE(max(NSR[Texto]),LASTNONBLANK('Calendar'[Date],CALCULATE(max(NSR[Texto])))))
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you! Your solution is the expected behavior. The only thing is still missing is how I could get with this that if an employee does not have a project assigned in the current month, the columns should be in blank.
You are welcome. Drag Month from the Calendar Table into a slicer and select a certain month. Do you not get the expected result?
Hi,
You should be able to download a sample of the document in this link.
Here you have a reduced sample of the file. There are three tables:
As I said, I need to create a summary matrix that for each employee I can see their utilization (that's OK) and the last project and client they were assigned. If in that month, the employee was not assigned to any project, it should appear in blank. The problem is that if I add the project name (text field) and client, the current matrix brings the last ordered by name.
Thank you!
Hi,
To know the last project and client they were assigned to is not difficult because you have a Date column in the NSR table - so that can be done. However, in the utilisation table, there is no Date column. So this table would not respond to a Year/Month that we select in a slicer. Therefore, the utilisation figure in your matrix visual will appear incorrect.
FYI, to know the last project and client, you may use the LASTNONBLANK() function.
Could you be more specific with your proposal? Is your suggestion I use LASTNONBLANK() as a column in a table or as a measure. If it is in a table, which table do you suggest? Employee table? And if it is Employee table, how I call the other table with that function.
Should be the expression LASTNONBLANK('NSR'[Text], Month('NSR'[Date]) = Month(ReportMonth))?
Thank you!
Hi,
You may download my PBI file from here.
Hope this helps.
Hi,
Share the link from where i can download your PBI file.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 103 | |
| 79 | |
| 57 | |
| 51 | |
| 46 |