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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
dofrancis3
Resolver I
Resolver I

Extract value by latest date using DAX

Hello colleagues!

Once again i comme to request your kindly support regrading the following:

I have already a measure (LQAS) which contain my percentage (in the first column) so, i would like a measure who will display only percentage of lates date highlight in yellow in the print screen below:

Note: I don’t like to calculate percentage but just display.

 

dofrancis3_0-1711009184253.png

 

Thank you your help.

 

Fd.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @dofrancis3 ,
Thank you @Gabry  for your prompt reply. I have created a data example for you to solve the problem. You can follow the steps below:
1. Add a measure.

Colour = 
VAR _maxdate =
    RANKX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Country] = SELECTEDVALUE ( 'Table'[Country] )
        ),
        CALCULATE ( MAX ( 'Table'[Start date] ) ),
        ,
        DESC
    )
RETURN
    IF ( _maxdate = 1, "yellow" )


2. Put the measure into the fx in Visual.

vyifanwmsft_0-1711438282138.png

vyifanwmsft_1-1711438299329.png

Final output:

vyifanwmsft_2-1711438329918.png

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @dofrancis3 ,
Thank you @Gabry  for your prompt reply. I have created a data example for you to solve the problem. You can follow the steps below:
1. Add a measure.

Colour = 
VAR _maxdate =
    RANKX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Country] = SELECTEDVALUE ( 'Table'[Country] )
        ),
        CALCULATE ( MAX ( 'Table'[Start date] ) ),
        ,
        DESC
    )
RETURN
    IF ( _maxdate = 1, "yellow" )


2. Put the measure into the fx in Visual.

vyifanwmsft_0-1711438282138.png

vyifanwmsft_1-1711438299329.png

Final output:

vyifanwmsft_2-1711438329918.png

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Gabry
Super User
Super User

Hello,

this should be the formula:

Latest % =
IF (
    selectedvalue('Table'[start date] )= CALCULATE(
                    max('Table'[start date]),
                    ALLEXCEPT('Table', 'Table'[Country])
                ),
    % measure,
   blank
)

if  not working please paste your sample data as text and not as image. If it works please mark as accepted solution

(I made a correction because I used Min but you are looking for the Max)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.