Skip to main content

DAX measure to get the Id record of last updated date

Problem:
I have a case where I need to display only the latest updated record for a Id.
In the below image I need to display only the record which is updated on 11-06-2025 (Latest)




Solution:

DAX Measure

IsLatestActivity = 
VAR CurrentIQMS = MAX('POR D'[Id])
VAR CurrentDate = MAX('POR D'[Updated Date])

VAR LatestRow =
    TOPN(
        1,
        FILTER(
            ALL('POR D'),
            'POR D'[Id] = CurrentIQMS
        ),
        'POR D'[Updated Date], DESC
    )
RETURN
IF (
    COUNTROWS(
        FILTER(
            LatestRow,
            'POR D'[Id] = CurrentIQMS &&
            'POR D'[Updated Date] = CurrentDate
        )
    ) > 0,
    1,
    0
)

Comments

Popular posts from this blog

Convex Lens Vs Concave Lens

What is a Lens A lens is a transparent object that transmits light across it, and its working principle depends on the   law of refraction (Snell’s law) . Applications: Concave Lens help with Far-Sight Convex Lens help with Near-Sight

Herbal Plants

Herbal plants to grow in home Different types of keerai ----- http://www.indiandietrecipes.com/2016/03/pictures-of-various-types-of-greens-or.html Pirandai ----good for bone joins---- https://youtu.be/k2DGubyXLAE Valarai Keerai Benifits ----- https://youtu.be/33HIfLJKTqA Sesma seeds ---- https://easyayurveda.com/2011/02/24/sesame-and-sesame-oil-benefits-total-ayurveda-details/

What is Verbal and Non-Verbal communication

TYPES OF COMMUNICATIONS: