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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
atin
Advocate III
Advocate III

Using Dynamic text Narratives

Player with the most assistsPlayer with the most assists

Hi All 

Please see attached an excel report showing the premier league football players . I want to create a dynamic text narrative that tells me the player who has the most assist . e.g Harry Kane has the most assists of 11 

 

 The dynamic texts are underlined and in bold from example above (details below)

  • Harry Kane
  • Most Assists 
  • 11 

How do I go about creating a dynamic text

 

Many thanks 

 

3 ACCEPTED SOLUTIONS
PhilipTreacy
Super User
Super User

Hi @atin 

Download this PBIX with sample data and working code/visual

Try this Measure instead

Player With Most Assists = 

CALCULATE( MAX('Table'[Player Name]), TOPN(1, ALL('Table'))) & " has the most assists of "  & CALCULATE( MAX('Table'[Most Assists]), TOPN(1, ALL('Table')))

most-assists.png

 

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

Many thanks for the solution. I have one further question relating to this example

 

If I want to include the team Harry Kane plays for, how do I do this. One of the columns in the data set has the TEAMS included.

 

I want my narrative to say Harry Kane plays for Tottenham and has the most assists of 11

 

Many thanks 

View solution in original post

Hi @atin 

 

Download this sample PBIX file

 

If your table looks like this

footy-teams.png

then use this measure

Player With Most Assists = 

CALCULATE( MAX('Table'[Player Name]), TOPN(1, ALL('Table'))) & " plays for " & CALCULATE( MAX('Table'[Teams]), TOPN(1, ALL('Table'))) & " and has the most assists of "  & CALCULATE( MAX('Table'[Most Assists]), TOPN(1, ALL('Table')))

to give this result

footy-meas2.png

 

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

6 REPLIES 6
PhilipTreacy
Super User
Super User

Hi @atin 

Download this PBIX with sample data and working code/visual

Try this Measure instead

Player With Most Assists = 

CALCULATE( MAX('Table'[Player Name]), TOPN(1, ALL('Table'))) & " has the most assists of "  & CALCULATE( MAX('Table'[Most Assists]), TOPN(1, ALL('Table')))

most-assists.png

 

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Many thanks for the solution. I have one further question relating to this example

 

If I want to include the team Harry Kane plays for, how do I do this. One of the columns in the data set has the TEAMS included.

 

I want my narrative to say Harry Kane plays for Tottenham and has the most assists of 11

 

Many thanks 

Hi @atin 

 

Download this sample PBIX file

 

If your table looks like this

footy-teams.png

then use this measure

Player With Most Assists = 

CALCULATE( MAX('Table'[Player Name]), TOPN(1, ALL('Table'))) & " plays for " & CALCULATE( MAX('Table'[Teams]), TOPN(1, ALL('Table'))) & " and has the most assists of "  & CALCULATE( MAX('Table'[Most Assists]), TOPN(1, ALL('Table')))

to give this result

footy-meas2.png

 

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi @PhilipTreacy - Many thanks for the solution provided above. 


I have another question relating to the solution and example used in the sample pbix file above Where 2 players have the same number of most assists eg Kevin De Bruyne (Man City)  & Harry Kane(Tottenham) both have 11.

How do I create a narrative which says

 

Kevin De Bruyne, Man City player and Harry Kane, Tottenham player have the most assists of 11


Many thanks 

 

atin
Advocate III
Advocate III

Hi  @amitchandak  Many thanks for responding back. There appears to be an error when creating the measure. The error says:

 The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

 

See measure below:

Player with Most Assists =

CALCULATE(
    MAX('Table A'[Player Name]), TOPN(1, ALL('Table A'[Player Name] ) , ALL('Table A'), DESC) ,  
    VALUES('Table A'[Player Name] ) )
    & "Most assists" &
    CALCULATE(
        ALL('Table A'[Assists]), TOPN(1, ALL('Table A'[Player Name] ), ALL('Table A'), DESC,

        VALUES('Table A'[Player Name]) ))

amitchandak
Super User
Super User

@atin , a new measure like

meausre =

CALCULATE(Max(Table[player name]),TOPN(1,all(Table[Player Name]),[all Assists],DESC),VALUES(Table[Player Name]))

& " Most assists "

&

CALCULATE([all Assists],TOPN(1,all(Table[Player Name]),[all Assists],DESC),VALUES(Table[Player Name]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.