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
alexbalazsalex
Helper IV
Helper IV

Rankx or Topn

Dear All ,

 

i would need you support to retrive my top customers

 

I have the following table

 

Year monthproduct detailsClientTons
18-Janaa115
18-Janv24
18-Jands113
18-Jandsg134
18-Jansdfs25
17-Decdf114
17-Deczf113
17-Decdz1134
17-Decz25
17-Decdf26
17-Deczf27
17-Decdfz13
17-Novzf114
17-Novzdf113
17-Novzdd24
17-Novfz25
17-Novzf23
17-Novfzd114
17-Novzf14

 

I have different month - clients products tons ect... a lot of info

I want to retrive my top 2 customers from the above for each month or accumultate month if i do the selection.

 

COuld you please help me with this can t get the foruma right ..

 

so let s say i select a business unit and a month to give me in a list top 2 customers with amount next to it  and maybe total under ?

 

Many Thanks,

Alex

1 ACCEPTED SOLUTION

Hi @alexbalazsalex,

 

Was my above suggestion helpful to you? If yes, would you please kindly mark it as an answer so that it can benefit more users?

 

Thanks,

Yuliana Gu

Community Support Team _ Yuliana Gu
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

4 REPLIES 4
v-yulgu-msft
Employee
Employee

Hi @alexbalazsalex,

 

Please try below measures:

Total tons =
CALCULATE (
    SUM ( Client_Tons[Tons] ),
    ALLEXCEPT ( Client_Tons, Client_Tons[Year month], Client_Tons[Client] )
)

Rankx =
RANKX (
    ALLEXCEPT ( Client_Tons, Client_Tons[Year month] ),
    Client_Tons[Total tons],
    ,
    DESC,
    DENSE
)

Insert a table visual and drag corresponding fields to it. If you want to show TopN records, please add [RANKX] into "visual level filters" and set its value to be equal to or less than N.

1.PNG

 

Best regards,

Yuliana Gu

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

Thanks @v-yulgu-msft

 

I will give ti a try and let you know..

 

meanwhile fi you get a chance could you please have a look at my other thread ? mabe you have an i deea what i could do to make it work ..

 

https://community.powerbi.com/t5/Desktop/Urgent-Support-for-matrix-table/m-p/369162#M167237

 

Many many thanks

Alex

Hi @alexbalazsalex,

 

Was my above suggestion helpful to you? If yes, would you please kindly mark it as an answer so that it can benefit more users?

 

Thanks,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
alexbalazsalex
Helper IV
Helper IV

exex

Maybe to look something like this :

 

 

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.