Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Lazurens
Frequent Visitor

Get Rows with last change with the date

Hello everyone, 

 

I have a table containing for value  
Category AB have value 34 at date 23/03/2023 and the days after it has another value 45
I need to get the last value with the last date

CategoryValueDate
AB4524/03/2023

My try partially works :

 

Masterdata LastChange = SUMMARIZE('Masterdata',
'Masterdata'[FAMILLE_PRODUCTION], 
"Cadence Opérationnelle", CALCULATE(MAX('Masterdata'[CADENCE_OPERATIONNELLE]),
'Masterdata'[DERNIER_CHANGE] = MAX('Masterdata cadences ligne'[DERNIER_CHANGE])))

 

When I add the date column I get all the rows without the filter

Lazurens_0-1680510018346.png

Can any one help me add the [DERNIER_CHANGE]

Thanks in advance 🙂

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Lazurens 
Please try

Masterdata LastChange =
SUMMARIZE (
    'Masterdata',
    'Masterdata'[FAMILLE_PRODUCTION],
    "Cadence Opérationnelle",
        CALCULATE (
            MAX ( 'Masterdata'[CADENCE_OPERATIONNELLE] ),
            'Masterdata'[DERNIER_CHANGE] = MAX ( 'Masterdata'[DERNIER_CHANGE] )
        ),
    "Dernier Change", MAX ( 'Masterdata'[DERNIER_CHANGE] )
)

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @Lazurens 
Please try

Masterdata LastChange =
SUMMARIZE (
    'Masterdata',
    'Masterdata'[FAMILLE_PRODUCTION],
    "Cadence Opérationnelle",
        CALCULATE (
            MAX ( 'Masterdata'[CADENCE_OPERATIONNELLE] ),
            'Masterdata'[DERNIER_CHANGE] = MAX ( 'Masterdata'[DERNIER_CHANGE] )
        ),
    "Dernier Change", MAX ( 'Masterdata'[DERNIER_CHANGE] )
)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors