Forum Discussion
alexbjorlig
Helper IV
4 years agoHow to group table by date
I'm new to DAX, and need to find the latest value by date in a measure. Input: category date value1 value2 A 3/3/2020 04:30:00 1 0 A 2/1/2020 04:30:00 0 1 A 1/1/2020...
- 4 years ago
alexbjorlig
Try this table, it will work for any number of columns in your tableNew Table = FILTER( table, VAR __cat = Table[category ] RETURN Table[date] = CALCULATE( MAX(Table[date]) , REMOVEFILTERS() , Table[category ] = __cat) )
amitchandak
Super User
4 years agoalexbjorlig , Based on what I got. In a table visual Take Max of value 1 and Min of value 2
Or create a new table
summarize(Table, Table[Category], Table[Date], "Val1", Max(Table[Value1]), "Val2", Min(Table[Value2]))