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
RichardT_78
Helper I
Helper I

Returning the latest data row

Hi All 

 

I cant find how to display duplicate data - have have seen some simple right click remove duplicate copies but i dont have these option available to me as im using a live dataset connection.This seems to limit some of the functionalites. 

 

I am looking to make a messure to differentiate data rows 

 

Robot 1      Variable 1   vairable 2     23/3/20 10:00

Robot 2      Variable 1   vairable 2      Date and time stamp

Robot 1      Variable 1   vairable 2      27/3/20 11:00

Robot 3      Variable 1   vairable 2      Date and time stamp

Robot 1      Variable 1   vairable 2      30/3/20 12:34

 

How can i use a messure to show this

Robot 1      Variable 1   vairable 2      30/3/20 12:34

Robot 2      Variable 1   vairable 2      Date and time stamp

Robot 3      Variable 1   vairable 2      Date and time stamp

 

I looked at relationships but that is greyed out.

I cant carry out this Soulution  as i cant group either.

https://community.powerbi.com/t5/Desktop/Finding-the-most-recent-date-time-for-each-row/m-p/555438#M...

 

Can i check the robot name againt the max date ?No sure how this would look in DAX

Thanks for any help that anyone can provide. 

 

Richard 

 

 

1 ACCEPTED SOLUTION

Hi @RichardT_78 

 

this Measure should work with the updated scenario.

Measure 10 = 
VAR __maxDate = 
    CALCULATE(
        MAX( Table[Date] ),
        ALLEXCEPT( Table, Table[Robot] )
    )
RETURN 
CALCULATE(
    COUNTROWS( Table ),
    TREATAS( { __maxDate }, Table[Date] )
)

Later you can use it in a filter pane as filters on this visual, like below.

image.png

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

View solution in original post

4 REPLIES 4
Mariusz
Community Champion
Community Champion

Hi @RichardT_78 

 

try this

max date stamp = MAX( table[datetimecolumn] )

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

No this did not work 

 

It does'nt seem to take into account the differences in the difference in colums 

 

E.G 

                   motor temp     Is fault light on/ off       comments     Max Date.

Robot 1          14 deg               on                               very hot        27/3/20

Robot 1          11 deg               on                                    hot           28/3/20

Robot 2          3 deg                 off                                   n/a            29/3/20   

 

Ideally i want to show item 2&3 in red only 

 

Richard 

 

Hi @RichardT_78 

 

this Measure should work with the updated scenario.

Measure 10 = 
VAR __maxDate = 
    CALCULATE(
        MAX( Table[Date] ),
        ALLEXCEPT( Table, Table[Robot] )
    )
RETURN 
CALCULATE(
    COUNTROWS( Table ),
    TREATAS( { __maxDate }, Table[Date] )
)

Later you can use it in a filter pane as filters on this visual, like below.

image.png

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Worked Perfectly Mariusz

 

Thank you for your help 

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.