Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi Team,
Newbie here,
I am having an issue on using below measure when it comes to identifying the last task inserted by the user.
I am using below measure:
Measure =
VAR __id = MAX( 'Table'[EmployeeID] )
VAR __date = CALCULATE ( MAX( 'Table'[Date] ), ALLSELECTED ( 'Table' ), 'Table'[EmployeeID] = __id )
RETURN CALCULATE ( sum ( 'Table'[EmployeeID] ), VALUES ( 'Table'[EmployeeID] ), 'Table'[EmployeeID] = __id, 'Table'[Date] = __date )
Result:
This works fine, however, when the user inserted the same task, my measure will give a 2 outputs.
Instead of that, I want a result to be like this:
Another Note:
There are multiple users that will insert a task so the output must be 1 for each user.
Thank you so much for answering! Greatly appreciate it !
Solved! Go to Solution.
Hi @Anonymous
I think you can try smth like
Measure =
VAR __id = MAX( 'Table'[EmployeeID] )
VAR __date = CALCULATE ( MAX( 'Table'[Date] ), ALLSELECTED ( 'Table' ), 'Table'[EmployeeID] = __id )
RETURN
IF(SELECTEDVALUE('Table'[EmployeeID]) = __id && SELECTEDVALUE('Table'[Date]) = __date, __id, BLANK() )
This seem fine.
Can you share sample data and sample output.
Hi @amitchandak ,
I've provided a screenshot.
on the first screenshot there are 2 output wherein it should be one because its the same ID its just that the task are the same. The output must only be 1 and it supposed to be the latest row based on date/time as shown on the 2nd screenshot.
Hi @Anonymous
I think you can try smth like
Measure =
VAR __id = MAX( 'Table'[EmployeeID] )
VAR __date = CALCULATE ( MAX( 'Table'[Date] ), ALLSELECTED ( 'Table' ), 'Table'[EmployeeID] = __id )
RETURN
IF(SELECTEDVALUE('Table'[EmployeeID]) = __id && SELECTEDVALUE('Table'[Date]) = __date, __id, BLANK() )
User | Count |
---|---|
76 | |
74 | |
61 | |
61 | |
45 |
User | Count |
---|---|
108 | |
103 | |
93 | |
83 | |
64 |