This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi all
I have a weird situation, and Im not sure how to tackle it.
My data is as follows:
Name. Category. Date
Anne Other. Banana. 1st Feb
Anne Other. Banana. 2nd Feb
Anne Other. Apple. 30th Jan
John Smith. Banana. 30th Jan
John Smith. Banana. 2nd Feb
Im wondering if there's is a way to create a column that marks the latest row for each individual name, for each individual category, so in this example rows 2,3 and 5 would receive the marker where the others wouldn't.
Is there a way because Im tempted to say its impossible!
Many thanks
Solved! Go to Solution.
You could create a calculated column as below:
Is Latest Row =
VAR CurrName = 'Table'[Name]
VAR CurrCat = 'Table'[Category]
VAR CurrDate = 'Table'[Date]
VAR MaxDateForPair =
CALCULATE (
MAX ( 'Table'[Date] ),
FILTER (
ALL ( 'Table' ),
'Table'[Name] = CurrName && 'Table'[Category] = CurrCat
)
)
RETURN
IF ( CurrDate = MaxDateForPair, 1, 0 )
I have tried with calculated column from sample data. Can you give a try from the image and confirm. Thank You!
You could create a calculated column as below:
Is Latest Row =
VAR CurrName = 'Table'[Name]
VAR CurrCat = 'Table'[Category]
VAR CurrDate = 'Table'[Date]
VAR MaxDateForPair =
CALCULATE (
MAX ( 'Table'[Date] ),
FILTER (
ALL ( 'Table' ),
'Table'[Name] = CurrName && 'Table'[Category] = CurrCat
)
)
RETURN
IF ( CurrDate = MaxDateForPair, 1, 0 )
Thank you so much!!
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 29 | |
| 27 | |
| 25 | |
| 19 | |
| 14 |
| User | Count |
|---|---|
| 56 | |
| 48 | |
| 37 | |
| 21 | |
| 20 |