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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
CoboleiroBr
Helper I
Helper I

How to order TOP N by last month?

Hi guys! 

I'm new to Power BI and I have a doubt about ordering TOP N graph.

I have a Calendar table, a Tickets table and a measure called "Abertos" (Opened Tickets). I need to show what areas opened up most Tickets, in a month basis.

 

So I have this:PB.png

 

The problem is...I need to show the TOP N graph ordered by Opened Tickets, by last Month. 

So, I would like to see "Produção" first, because this area opened up 63 tickets in March, and "Pós-Venda" after, because it opened up 59 tickets in March.

 

Could you help me with that?

 

Thanks in advance and sorry for any English mistakes.

 

 

 

3 REPLIES 3
v-ljerr-msft
Employee
Employee

Hi @CoboleiroBr,

 

According to your description above, you should be able to follow steps below to change how your chart is sorted in this scenario. Smiley Happy

 

  1. Select the ellipses (...) and choose Sort by Abertos.

  2. If necessary, select the sort icon  to change to Descending.

 

Regards

Hello @v-ljerr-msft !

 

Thanks for the answer but I guess you didn't get the problem or I was not so clear...

Let me try to explain again...

 

The order by "Abertos" is considering the total quantity for the three months in the graph.

 

Pós-Venda

January - 46

February - 35

March - 59

Total: 140

 

Produção

January - 15

February - 31

March - 63

Total: 109

 

So, "Pós Venda" is listed at the top of the list, because 140 > 109.

 

But, for the greatest month/year selected (Mar/2017), "Produção" is greater than "Pós-Venda" (63 > 59), and I want this at the top of the list. To order the graph I want to consider the quantity only for the greatest month/year selected.

 

Let me know if you need more information and thanks again!

Hi @CoboleiroBr,

 

Sorry for my misunderstanding. I see it now. Smiley Happy

 

According to your description above, I don't think there is an easy way to do this currently. All I can think is creating different measures to calculate Abertos for each month using some formula similar like below.

Abertos_Mar-17 =
CALCULATE (
    [Abertos],
    FILTER ( 'CalendarTable', 'CalendarTable'[MonthYear] = "mar-17" )
)

And show all these measures on the chart, then you should be able to choose Sort by Abertos_Mar-17 by selecting the ellipses (...).

 

Regards

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.