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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
jfenico
Helper III
Helper III

Displaying latest record for Company and Server

I've read some scenarios where users want to display the latest record though my specific issue is a little different due to the information I am gathering. Hoping for a little help.

 

I currently and getting reports from servers that include diagnostic information and logs. These reports come from multiple servers and multiple companies. I need to be able to see the latest report per server and per company. It looks something like this.

 

Company A - Server 1 - 12/1/18- Info

Company A - Server 1 - 12/2/18

Company A - Server 2 - 12/1/18- Info

Company B - Server 1 - 12/1/18- Info

Company B - Server 2 - 12/1/18- Info

Company B - Server 2 - 12/2/18 - Info

Company B - Server 3 - 12/1/18- Info

 

In this scenario I would only want to see the latest report for each individual server. It's very possible that certain servers do not report back each day so I can't assume the latest date would include all servers (e.g. one server may report back once a week, while another server would report back every day). I'm imagining some type of grouping but unsure how this would work.

 

The info column is actual multiple columns parsed by a comma deliminter.

1 ACCEPTED SOLUTION

Just an update on how I got this to work.

I created a new column that concatanted the company name and server name to make a unique ID.

Once a unique ID was created I followed this post on how to show the last value: https://community.powerbi.com/t5/Desktop/Calculate-last-value-by-date-and-id/td-p/453891

View solution in original post

5 REPLIES 5
Greg_Deckler
Super User
Super User

So each of those are separate columns then? Company, Server, Date, Info?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

That's correct Greg. Info is technically multiple columns about server statistics (RAM, CPU utilization, stuff like that).

So, you can just use MAX or MAXX to find the maximum date within the context of your visual and then just return the information from there. So, for example if you have a Company and Server in your visual, you could do this:

 

Measure = 
VAR __max = MAX('Table'[Date])
RETURN
MAXX(FILTER('Table',[Date] = __max),[Info])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Hi Greg, thank you for the response.

 

A little confused by the solution proposed.

Info is not one column it is multiple columns. Also once the measurement is created (I went ahead and tested this out on one of the info columns I would like to filter) how do I apply it? I'm not looking to filter for a specific visual but rather all tables/visuals across the entire report.

Just an update on how I got this to work.

I created a new column that concatanted the company name and server name to make a unique ID.

Once a unique ID was created I followed this post on how to show the last value: https://community.powerbi.com/t5/Desktop/Calculate-last-value-by-date-and-id/td-p/453891

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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