Forum Discussion

Rince91's avatar
Rince91
Icon for Helper I rankHelper I
2 years ago
Solved

Visualisation of a measure that returns a string

I have this measure:

 

Summary = "A total of " + [Total_risks] + " risks have been identified. Of these risks " + [Total_Closed_Risks] + " have been closed. With " + [Total_Open_risks] + " still open and ongoing."

 

It uses a couple of other measures to produce a dynamic string based on the number of risks for that customer.

 

What visulisation can i use that will display the string as formatted above?

 

I have tried a card, but that doesn't work. I have tried using a text box and adding a value that links to the measure. But nothing seems to work.

 

Any ideas?

3 Replies

  • Hi Rince91 - Dynamic string you've created in your measure as a visualization, you can use a table or matrix visualization in power bi report.

    Try as below:

     

    Summary = "A total of " & FORMAT([Total_risks], "0") & " risks have been identified. Of these risks " & FORMAT([Total_Closed_Risks], "0") & " have been closed. With " & FORMAT([Total_Open_risks], "0") & " still open and ongoing."

     

    Make sure that the calculated field is formatted as text/string in your visualization settings.

     

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!

  • This works perfectly fine in a card, please see below.

     

     

    • Rince91's avatar
      Rince91
      Icon for Helper I rankHelper I

      Thanks i was using "+" instead of "&" changing that made it work!