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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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 Sage
Solution Sage

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 Sage
Solution Sage

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Kudoed Authors