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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Determine maximum row of database

Hi,

 

I have the following table. Machine status color is a calculated column. Now I need only the first row of the table to be displayed, which is the maximum of the end time. How can I achieve this? Problem is integrating measure into a calculated column. Please reply a.s.a.p. Thanks in advance!

 

2019-08-16 09_34_55-Window.png

9 REPLIES 9
v-diye-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could probably try the RANKX function.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Anonymous
Not applicable

Hi, I do not get the required results with above mentioned solutions. To be more specific: I need a table which represents the latest end time and machine status per machine ID. How can I achieve this?

RobbeVL
Impactful Individual
Impactful Individual

Hi,

 

I think this will help ? 

 

 

 

Capture.JPG

 

LastStatus = 
MAXX(
SUMMARIZE('Table';'Table'[ID]; "mx"; MAX('Table'[End time]));
MAX('Table'[Status]))

What will be the final output?

According to my understanding,

This is the what you need.

If not, Please provide a sample output.

 

2019_08_19_11_22_06_Untitled_Power_BI_Desktop.png

 

 

Anonymous
Not applicable

Hi,

 

Thanks for your feedback. I don't get the correct result with the summarize function but formula with '
Calculate(lastnonblank) works partly. Then I get the underlying table.  When I put the color into the table, the lastnonblank for every color is presented. This is not what I need. I need one color of the last non blank. See printscreen as an example.  I have 8 machines so I need the 8 rows which presents the machine ID, the last non blank date/time and the related color. For machine ID 1 this is the color Red, for machine ID 2 color Red, for machine ID 3 color orange, etc... Thanks for support in advance.

 

Power BI.png

Ashish_Mathur
Super User
Super User

Hi,

The first row in your image is not the max of the End time.  Infact it is the minimum.  I am not clear with your end result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
RobbeVL
Impactful Individual
Impactful Individual

Hi there,

 

You could just filter your visual like this:

 

Capture9.PNG

 

hope this helps ?

Anonymous
Not applicable

Table is empty after this action! Alternative solution???
RobbeVL
Impactful Individual
Impactful Individual

Add a filter, is not blank ? 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors