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.
I have a fact table with events, a date table, and a person table. I am trying to write a measure that returns the most recent event for each employee. Having trouble, any help appreciated. Below is what I have started..
hi @PompanoPete ,
Hi, @PompanoPete
try below
_most recent Event =
var a = calculate(max('Date'[Full Date]),allexcept('Person','Person'[Employee Number]))
CALCULATE (
MAX ( vFactEmployeeEvent[Event Name] ),
FILTER (
ALL ( vFactEmployeeEvent ),
'Date'[Full Date] = a,
'Person'[Employee Number] = 'Person'[Employee Number]
)
)
I added a return before calculate. Here is the latest.
getting error stating cannot find ful Date.. I seem to get this allot and tried using related but no luck.
I tried returning just the variable a, which evaluated without error, but instead of getting the max date, I just got full date and the number of rows for Employee1 jumped from 11 to hundreds. I suspect one for each row in the fact table. Thanks for the response. Below is sample data.
_most recent Event =
var a = calculate(max('Date'[Full Date]),allexcept('Person','Person'[Employee Number]))
CALCULATE (
MAX ( vFactEmployeeEvent[Event Name] ),
FILTER (
ALL ( vFactEmployeeEvent ),
'Date'[Full Date] = a &&
'Person'[Employee Number] = 'Person'[Employee Number]
)
)
Hi, @PompanoPete
replace ( , ) with &&
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
70 | |
37 | |
21 | |
18 | |
15 |
User | Count |
---|---|
126 | |
32 | |
28 | |
24 | |
24 |