Forum Discussion

ewill_bdg's avatar
ewill_bdg
Regular Visitor
9 years ago

Add Row Percentage

I need to add a colomn  Matrix that calculate the percentage (%) of UNITs "ON MOVE":

 

 

I almost got it, the problem is that it calculate it for all the columns. 

 

How Can I Calculate the % of STATUS = ON MOVE by UNIT

 

I asume that it can be done using a measure, may be something like this: %OnMove= SUM(Inventory[STATUS1] = 'ON MOVE'/TOTAL by UNIT

 

I've been using PowerBI for less that 2 weeks, so please consider this in your response (asume I know nothing)

 

6 Replies

  • kjsullivan's avatar
    kjsullivan
    Frequent Visitor

    ewill_bdg You can create a measure, such as Measure = DIVIDE([ON MOVE],[Total Sum of Available]) then convert it to a % format by clicking the measure in the Fields list then going to the Modeling tab in the top left.

    • ewill_bdg's avatar
      ewill_bdg
      Regular Visitor

      ERROR:

      The value for 'ON MOVE' cannot be determined. Either 'ON MOVE' doesn't exist, or there is no current row for a column named 'ON MOVE'

       

      Same for: Total Sum of Available

    • kjsullivan's avatar
      kjsullivan
      Frequent Visitor

      ewill_bdgCreate a measure of the On Move Sum of Available. 

      Sum of On Move Available = SUMX(On Move, Sum of Available)

       

      I can't tell what Table the Total Sum Available is in or if that is a table itself. You may need to provide more code there, but I think you will then need to do

       

      Divide([Sum of On Move Available],[Total Sum of Available])

       

      You can then filter it by unit within your report

      • ewill_bdg's avatar
        ewill_bdg
        Regular Visitor

        This is how i have configured the Matrix:

         

        Row: UNITS

         

        Column: STATUS1

         

        Values : SUM[STATUS1]

                    COUNT[STATUS1]   show value as percentage row of total

         

        I hope this helps.