Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Solved! Go to Solution.
@Singularity9
Apologies, that was a typo mistake, I was actually typing on my phone and missed the N argument of TOPN. Please try
Latest Task =
VAR CaseRef = 'CASE'[Case Ref]
VAR T1 =
FILTER (
'CASE TASK HISTORY',
'CASE TASK HISTORY'[Case Ref] = _caseref
&& 'CASE TASK HISTORY'[GTH Task Name] IN { "Type A", "Type B", "Type C", "Type D" }
)
VAR T2 =
TOPN ( 1, T1, 'CASE TASK HISTORY'[GTH Performed Datetime] )
RETURN
MAXX ( T2, 'CASE TASK HISTORY'[GTH Task Name] )
Please try
Latest Task =
VAR CaseRef = 'CASE'[Case Ref]
VAR T1 =
FILTER (
'CASE TASK HISTORY',
'CASE TASK HISTORY'[Case Ref] = _caseref
&& 'CASE TASK HISTORY'[GTH Task Name] IN { "Type A", "Type B", "Type C", "Type D" }
)
VAR T2 =
TOPN ( T1, 'CASE TASK HISTORY'[GTH Performed Datetime] )
RETURN
MAXX ( T2, 'CASE TASK HISTORY'[GTH Task Name] )
Thanks for the help. I'm afraid this below part doesn't work, as the second argument in TOPN needs to be a table, not a column:
VAR T2 =
TOPN ( T1, 'CASE TASK HISTORY'[GTH Performed Datetime] )
When I change it to this:
VAR T2 =
TOPN ( T1, 'CASE TASK HISTORY', [GTH Performed Datetime])
...then it is no longer underlined as an error, but then when I run the formula I get "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."
@Singularity9
Apologies, that was a typo mistake, I was actually typing on my phone and missed the N argument of TOPN. Please try
Latest Task =
VAR CaseRef = 'CASE'[Case Ref]
VAR T1 =
FILTER (
'CASE TASK HISTORY',
'CASE TASK HISTORY'[Case Ref] = _caseref
&& 'CASE TASK HISTORY'[GTH Task Name] IN { "Type A", "Type B", "Type C", "Type D" }
)
VAR T2 =
TOPN ( 1, T1, 'CASE TASK HISTORY'[GTH Performed Datetime] )
RETURN
MAXX ( T2, 'CASE TASK HISTORY'[GTH Task Name] )
That did it! Thank you very much, that's incredibly helpful. Great job!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
19 |