This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi,
I have the below dataset.
| Site | Date Completed | DaysLastClean |
| 0.39.09.4 - Room | 2/13/2020 21:55 | 1 |
| 0.39.09.4 - Room | 2/18/2020 22:04 | 5 |
| 0.39.09.4 - Room | 2/21/2020 22:08 | 3 |
| 1-31-62 - W/R | 2/14/2020 18:41 | 4 |
| 1-31-62 - W/R | 2/18/2020 19:50 | 4 |
| 1-31-62 - W/R | 2/19/2020 19:56 | 1 |
| 1-31-62 - W/R | 2/20/2020 17:26 | 1 |
| 1-31-62 - W/R | 2/21/2020 18:42 | 1 |
| 1-31-69 - PTW/R | 2/11/2020 20:37 | 1 |
| 1-31-69 - PTW/R | 2/14/2020 18:16 | 3 |
| 1-31-69 - PTW/R | 2/18/2020 19:45 | 4 |
| 1-31-69 - PTW/R | 2/19/2020 16:46 | 1 |
| 1-31-69 - PTW/R | 2/20/2020 16:35 | 1 |
| 1-31-69 - PTW/R | 2/21/2020 16:55 | 1 |
The column "DaysLastClean" is a calculated columns
| Site | Date Completed | DaysLastClean |
| 0.39.09.4 - Room | 2/21/2020 22:08 | 3 |
| 1-31-62 - W/R | 2/21/2020 18:42 | 1 |
| 1-31-69 - PTW/R | 2/21/2020 16:55 | 1 |
Appreciate all help for a Measure or column to achieve the above result.
Solved! Go to Solution.
Refer
Measure =
VAR __id = MAX ( 'Table'[Site] )
VAR __date = CALCULATE ( MAX( 'Table'[Date Completed] ), ALLSELECTED ( 'Table' ), 'Table'[Site] = __id )
RETURN CALCULATE ( max ( 'Table'[DaysLastClean] ), VALUES ( 'Table'[Site] ), 'Table'[Site] = __id, 'Table'[Date Completed] = __date )
Appreciate your Kudos.
I think you just need a table visualization with Site in it and Date set to an aggregation of Last and then your DaysLastClean?
Refer
Measure =
VAR __id = MAX ( 'Table'[Site] )
VAR __date = CALCULATE ( MAX( 'Table'[Date Completed] ), ALLSELECTED ( 'Table' ), 'Table'[Site] = __id )
RETURN CALCULATE ( max ( 'Table'[DaysLastClean] ), VALUES ( 'Table'[Site] ), 'Table'[Site] = __id, 'Table'[Date Completed] = __date )
Appreciate your Kudos.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 37 | |
| 37 | |
| 31 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 76 | |
| 59 | |
| 31 | |
| 31 | |
| 25 |