Forum Discussion
Anonymous
6 years agoNot applicable
Latest Date
Hi All, I have a table with the structure below: Process Number Date Department Description 354152 05/10/2019 10:24:20 AM IT 354152 05/10/2019 10:29:10 AM Business 354152 0...
- 6 years ago
Like this?
Column = CALCULATE ( MAX ( Jen[Date] ), ALLEXCEPT ( Jen, Jen[Process Number], Jen[Department Description] ) )
Anonymous
6 years agoNot applicable
Hi,
DateMax code:
Column =
CALCULATE (
MAX ( Jen[Date] ),
ALLEXCEPT ( Jen, Jen[Process Number], Jen[Department Description] )
)
Column code:
Column =
VAR ProcessNum = Jen[Process Number]
VAR Dept = Jen[Department Description]
VAR F =
FILTER (
ALL ( Jen ),
Jen[Process Number] = ProcessNum
&& Jen[Department Description] = Dept
)
VAR MaxDate =
CALCULATE ( MAX ( Jen[Date] ), F )
VAR UsersWithMaxDate =
SELECTCOLUMNS ( FILTER ( F, Jen[Date] = MaxDate ), "Users", Jen[User] )
VAR NumOfUser =
COUNTROWS ( UsersWithMaxDate )
VAR Result =
IF (
NumOfUser > 1,
CONCATENATEX ( UsersWithMaxDate, [Users], ", " ),
UsersWithMaxDate
)
RETURN
Result
AntrikshSharma
6 years agoCommunity Champion
sorry Jen looks like I am confused, can you share again what the issue is?
- Anonymous6 years agoNot applicable
The issue is that it shows two lines instead of one with the latest date and with the latest user. When I try to use the last code you sent i have an error below