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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Pyro1291
Frequent Visitor

Show top 3 servers with high utilisation for x months sorted by high utilisation of the latest month

What it might seem to be a simple task in Excel has left me stranded to achieve in Powerbi.

Sort, filter and show by latest month. I have captured by requirement in the below screenshot, please assist

image001.png

1 ACCEPTED SOLUTION

I have finally figured out the solution, it is quite simple and I'm ashamed that it didn't occur to me earlier.

 

1. Create a calculated column

LatestMonthEntry =

VAR LatestDate = MAX('Table'[Date])
RETURN
IF(
    MONTH('Table'[Date]) = MONTH(LatestDate) &&
    YEAR('Cluster'[Date]) = YEAR(LatestDate),
    "Yes",
    "No"
)
 
2. Create another column
UtilizationSort = IF('Table'[LatestMonthEntry]="Yes",'Table'[Utilization)],0)
 
3. Now in the visual. (Clustered Bar Chart)
In Filter pane - Sort top n servers by 'Sum of UtilizationSort'
And add UtilizationSort in the visual pane tooltip and sort the visual by it.

View solution in original post

7 REPLIES 7
Pyro1291
Frequent Visitor

Thank you very much for the response, this works well for showing the latest month alone in the chart.

I wanted to show the past months, but the sort should be based on the utilization of the latest month.

The idea is to see the past month's utilization trend of the server that is in the top 3 (sorted based on the utilization of the latest month)

 

the chart I have in my original post is what Im desiring to achieve. 

Anonymous
Not applicable

@Pyro1291  OK then I think you're going to have to calculate a sum by server in the Query Editor, then sort your data by that column.

I have finally figured out the solution, it is quite simple and I'm ashamed that it didn't occur to me earlier.

 

1. Create a calculated column

LatestMonthEntry =

VAR LatestDate = MAX('Table'[Date])
RETURN
IF(
    MONTH('Table'[Date]) = MONTH(LatestDate) &&
    YEAR('Cluster'[Date]) = YEAR(LatestDate),
    "Yes",
    "No"
)
 
2. Create another column
UtilizationSort = IF('Table'[LatestMonthEntry]="Yes",'Table'[Utilization)],0)
 
3. Now in the visual. (Clustered Bar Chart)
In Filter pane - Sort top n servers by 'Sum of UtilizationSort'
And add UtilizationSort in the visual pane tooltip and sort the visual by it.
Anonymous
Not applicable

@Pyro1291  Your solution contains some of the recommendations I suggested. It only seems simple now that you've received some guidance on how to solve your problem.

Agree, thank you very much for the guidance!

Anonymous
Not applicable

@Pyro1291  You're quite welcome! Kudos would be appreciated. 😊

Anonymous
Not applicable

One way you might be able to accomplish this is by taking the following steps:

1. Convert Jan, Feb, Mar to dates (1/1/23, 2/1/23, 3/1/23)

2. Create the following calculated column within your table

 

Is_Latest Date =

IF ( Sheet1[Month] = MAX ( Sheet1[Month] ), 1, 0 )

 

I believe this approach will work with the months as you have them formatted though

 

bchager6_1-1695562811252.png

 

3. Create a clustered column chart and bring the Server in to the X-axis, Utilization in to the Y-axis, and Month in to the Legend

4. Click on the chart and bring the Is_Latest Date column in to the "Filters on this Visual," and select 1.

 

bchager6_2-1695562863777.png

 

5. Click on the Server visual level filter, select the Top N filter type, drag Utilization in to the By value section, and show the Top 3 items

 

bchager6_3-1695562904251.png

 

 

bchager6_0-1695562771839.png

 

 

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.