Forum Discussion

unnijoy's avatar
unnijoy
Post Prodigy
3 years ago
Solved

Horizontal text display with data

I have a data table like below.

I want to get the name's and corresponding sales amount horizontally as shown below.

 

how can we show the data like this.



 

  • Here's an example that shows one way to do it.

    This measure is in the card visual below the table.

    TotalsString =
    VAR CitySales =
        ADDCOLUMNS ( DISTINCT ( Stores[City] ), "cSales", [Total Sales] )
    RETURN
        "Total Sales: "
            & CONCATENATEX (
                CitySales,
                Stores[City] & ": "
                    & FORMAT ( [cSales], "$0,,.0M" ),
                " "
            )

     

    Pat

     

3 Replies

  • ppm1's avatar
    ppm1
    Solution Sage

    Here's an example that shows one way to do it.

    This measure is in the card visual below the table.

    TotalsString =
    VAR CitySales =
        ADDCOLUMNS ( DISTINCT ( Stores[City] ), "cSales", [Total Sales] )
    RETURN
        "Total Sales: "
            & CONCATENATEX (
                CitySales,
                Stores[City] & ": "
                    & FORMAT ( [cSales], "$0,,.0M" ),
                " "
            )

     

    Pat

     

    • unnijoy's avatar
      unnijoy
      Post Prodigy

      Hi ppm1 the solution that you gave me is working.
      Can you please tell me how i can make "Total Slaes" Bold. Is it possible to do it.

      • ppm1's avatar
        ppm1
        Solution Sage

        Can't think of an easy way to do that. Probably possible with the HTML viewer visual.

         

        Pat