cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jfenico Regular Visitor
Regular Visitor

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

Accepted Solutions
jfenico Regular Visitor
Regular Visitor

Re: Displaying latest record for Company and Server

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

5 REPLIES 5
Super User
Super User

Re: Displaying latest record for Company and Server

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


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


jfenico Regular Visitor
Regular Visitor

Re: Displaying latest record for Company and Server

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

Super User
Super User

Re: Displaying latest record for Company and Server

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])

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


jfenico Regular Visitor
Regular Visitor

Re: Displaying latest record for Company and Server

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.

jfenico Regular Visitor
Regular Visitor

Re: Displaying latest record for Company and Server

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