Forum Discussion
How to show status updates in same row in Table
- Anonymous4 years ago
Hi dostdahl ,
I think you can create a measure and add this measure into the visual level filter of this table visual.
Filter = RANKX ( FILTER ( ALL ( 'Table' ), 'Table'[ID] = MAX ( 'Table'[ID] ) ), CALCULATE ( MAX ( 'Table'[Date From] ) ), , DESC, DENSE )Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 4 years ago
Here is the final updated solution
Previous Status = VAR CurrentIdTable = CALCULATETABLE ( Table, ALLEXCEPT ( Table, Table[ID] ) ) VAR PreviousDatesTable = FILTER ( CurrentIdTable, Table[Date From] < EARLIER ( Table[Date From] ) ) VAR PreviousDate = MAXX ( PreviousDatesTable, Table[Date From] ) VAR PreviousDateRecord = FILTER ( PreviousDatesTable, Table[Date From] = PreviousDate ) RETURN MAXX ( PreviousDateRecord, Table[Status] )Previous Date = VAR CurrentIdTable = CALCULATETABLE ( Table, ALLEXCEPT ( Table, Table[ID] ) ) VAR PreviousDatesTable = FILTER ( CurrentIdTable, Table[Date From] < EARLIER ( Table[Date From] ) ) RETURN MAXX ( PreviousDatesTable, Table[Date From]
Hi Anonymous -
Thank you for your help, these calculated columns appear to be working well. When I lay it out in a Table visual (like your attached result screenshot), the IDs that have multiple status updates appear more than once.
Do you know how to show each ID once, whether they have a previous status or a singular status?
Expected end result would look like
| ID | Name | Status | Date From | Previous Status | Previous Date |
| 1 | John Doe | Cultivation | 3/16/2022 | Solicitation | 3/14/2022 |
| 2 | Jane Doe | Stewardship | 2/23/2022 | ||
| 3 | Mike Smith | Solicitation | 2/24/2022 | Stewardship | 2/17/2022 |
Hi dostdahl ,
I think you can create a measure and add this measure into the visual level filter of this table visual.
Filter =
RANKX (
FILTER ( ALL ( 'Table' ), 'Table'[ID] = MAX ( 'Table'[ID] ) ),
CALCULATE ( MAX ( 'Table'[Date From] ) ),
,
DESC,
DENSE
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- dostdahl4 years ago
Helper I
Thank you so much Anonymous, this measure works well! I appreicate the help.