Forum Discussion
Using Dynamic text Narratives
- 5 years ago
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')))Regards
Phil
- 5 years ago
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
- 5 years ago
Hi atin
Download this sample PBIX file
If your table looks like this
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
Regards
Phil
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
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
Regards
Phil
- atin5 years agoAdvocate III
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