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
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?


@ 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!:
The Definitive Guide to Power Query (M)

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

@ 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!:
The Definitive Guide to Power Query (M)

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
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.