Forum Discussion

nultra's avatar
nultra
Regular Visitor
1 year ago
Solved

Power BI - Rows to Columns

I need to create a matrix, but my souce data has two collums that need to be altered 

 

 

The action column as three occuring actions, Purge, Add, and Scan. 

 

I need these to be headers with the counts to be assigned to below them. 

 

This is needed as the stores will then corespod to the relevant total 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi nultra ,

    You can use the following measure as the matrix value to display as a percentage.

    Percentage = 
    DIVIDE (
        SUM ( 'Table'[Counts] ),
        CALCULATE ( SUM ( 'Table'[Counts] ), ALL () )
    )

     

    Please see the attahced pbix file for reference.

    Best Regards,
    Dengliang Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • POSPOS's avatar
    POSPOS
    Post Partisan

    nultra  - 
    Step 1 - Add a matrix visual

    Step 2 - Add "Store" to Rows , "Action" to Columns. This will now make the Action Values  to be headers with the counts  assigned below them. 

     

     


    Hope this helps.

    • nultra's avatar
      nultra
      Regular Visitor

      Thanks for that, Is there a way to duplicate the total tab? I need the total to be as a % as well 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi nultra ,

    You can use the following measure as the matrix value to display as a percentage.

    Percentage = 
    DIVIDE (
        SUM ( 'Table'[Counts] ),
        CALCULATE ( SUM ( 'Table'[Counts] ), ALL () )
    )

     

    Please see the attahced pbix file for reference.

    Best Regards,
    Dengliang Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.