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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
_Regina
Helper I
Helper I

Get the names of top 5 Partners into a text description

Hi all,
 
I am trying to create some descriptive text in my Power BI Report. The requirement is the name of top 5 partners. So the output should be something like this "Top Partners performing better than their average previous year are Partner A, Partner B, Partner C"
 
I have created the below measure but obviously it does not work. How can I list the name of the partners that I get from the variable top_3_partners and concatenate it with the string?
Any help/guidance is appreciated.
Thank you
 
_Text top partners =
var top_3_partners= TOPN(3,ALL(Partner[Partner Name]),[_Overperformer Esign],DESC)
var result= "Top Partners performing better than their average previous year are " & top_3_partners
RETURN result

@amitchandak 
1 ACCEPTED SOLUTION
Alex87
Solution Supplier
Solution Supplier

You need to use CONCATENATEX to concatenate your results. It does not work as you write it because topN is a table where as DAX measure's result should be scalar.

Look at this video, it explains very well the steps to be taken ( Create insightful calculations using CONCATENATEX goodly)

https://youtu.be/xVLi31mOxeo?si=pONk1uUfEoLXD91t

 

If it answers your query, please mark my reply as the solution. Thank you!

View solution in original post

1 REPLY 1
Alex87
Solution Supplier
Solution Supplier

You need to use CONCATENATEX to concatenate your results. It does not work as you write it because topN is a table where as DAX measure's result should be scalar.

Look at this video, it explains very well the steps to be taken ( Create insightful calculations using CONCATENATEX goodly)

https://youtu.be/xVLi31mOxeo?si=pONk1uUfEoLXD91t

 

If it answers your query, please mark my reply as the solution. Thank you!

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Top Solution Authors