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
Anonymous
Not applicable

Top 5 for each month

Hi Everyone,

I want to show top 5 records for every month based on "Type" column for last 6 months data (Ex. Top 5 vaues for Jan , Top 5 for Feb etc) in a line graph.

So based on Type field I want to create 3 reports,

1. Top 5 Server names for % Processor Time by month.

2. Top 5 Server names for % Memory used by month.

3. Top 5 Server names for % Local Disk used by month.
Untitledpost.png

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

One way:

create  two measures for each type, for example for "% Processor Time", then add one measure in the visual level filter as below:

Processor_value = CALCULATE(SUM('Table 2'[value]),FILTER('Table 2','Table 2'[name]="% Processor Time"))

Processor_rank = RANKX(FILTER(ALLSELECTED('Table 2'),'Table 2'[name]="% Processor Time"&&'Table 2'[monthyear]=MAX('Table 2'[monthyear])),[Processor_value],,DESC,Dense)

Capture3.JPG

Another way:

add filter and measure in the visual level filter

rankall = RANKX(FILTER(ALLSELECTED('Table 2'),'Table 2'[monthyear]=MAX('Table 2'[monthyear])),CALCULATE(SUM('Table 2'[value])),,DESC,Dense)

Capture4.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

One way:

create  two measures for each type, for example for "% Processor Time", then add one measure in the visual level filter as below:

Processor_value = CALCULATE(SUM('Table 2'[value]),FILTER('Table 2','Table 2'[name]="% Processor Time"))

Processor_rank = RANKX(FILTER(ALLSELECTED('Table 2'),'Table 2'[name]="% Processor Time"&&'Table 2'[monthyear]=MAX('Table 2'[monthyear])),[Processor_value],,DESC,Dense)

Capture3.JPG

Another way:

add filter and measure in the visual level filter

rankall = RANKX(FILTER(ALLSELECTED('Table 2'),'Table 2'[monthyear]=MAX('Table 2'[monthyear])),CALCULATE(SUM('Table 2'[value])),,DESC,Dense)

Capture4.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

KBO
MVP

Hi @Anonymous ,

have you try to use under the Filter Pane the option Filtertype and change it to TopN? And then add the field you like to reference and apply. Then I would choose a date filter to select with the relative date option the last six month.

Otherwise you can use DAX measures to do it.

 

Best,

Kathrin

 

 

 

 

If this post has helped you, please give it a thumbs up!
Did I answer your question? Mark my post as a solution!

Anonymous
Not applicable

Yes I tried it but I want show for each months

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.