Forum Discussion

bourne2000's avatar
bourne2000
Icon for Helper V rankHelper V
4 years ago
Solved

How to create this table in Power BI?

Hi

 

I have a below table

 

 

I would like to have the output as below in matrix visual or any other similar visual

 

 

I tried to use the matrix visual but was unable to get the dollar sign for Money.

 

Easy to do in Excel, but not sure whether it's possible in Power BI

 

Can anyone advise how to do this or any alternative solution? I have a very small data so open to any data transformation to achieve the above result

 

Sample pbix file attached https://we.tl/t-TpiudIEEg1

 

 

 

 

  • ryan_mayu  Thanks a lot. It's working. I have one more question. What do I have to do if I need more categories to be displayed in '$', EXAMPLE Food, and Gym?

3 Replies

  • bourne2000 

    you can unpivot table and create a measure

    Measure = 
    VAR _SUM=SUM('Table'[Value])
    RETURN IF(SELECTEDVALUE('Table'[Category])="Money","$"&_SUM,_SUM)

    pls see the attachment below

     

    • bourne2000's avatar
      bourne2000
      Icon for Helper V rankHelper V

      ryan_mayu  Thanks a lot. It's working. I have one more question. What do I have to do if I need more categories to be displayed in '$', EXAMPLE Food, and Gym?

      • ryan_mayu's avatar
        ryan_mayu
        Icon for Super User rankSuper User

        bourne2000 

        pls try this

        Measure = 
        VAR _SUM=SUM('Table'[Value])
        RETURN IF(SELECTEDVALUE('Table'[Category]) in {"Money","Food","Gym"},"$"&_SUM,_SUM)