Forum Discussion

ShubhamBarnwal's avatar
ShubhamBarnwal
Frequent Visitor
6 years ago
Solved

Customized Total Row in table Visualization

Hello,

 

I am looking to get a customized value in the total row for table visualization in Power BI. Below is the screenshot of the task I am trying to achieve.

"Budget" total is simply the sum of all the rows. But the "% Complete" total is based on the formula mentioned in the screenshot. 

 
 

Please let me know of any solution to this. Thanks in advance.

 

  • ShubhamBarnwal try this measure

     

    % = 
    IF ( 
        HASONEFILTER( 'Table'[Desc] ), 
        SUM ( 'Table'[% Complete] ), 
        DIVIDE ( 
            SUMX ( 'Table',  CALCULATE( SUM ( 'Table'[Budget] ) ) * CALCULATE( SUM ( 'Table'[% Complete] ) ) ),
            CALCULATE( SUM ( 'Table'[Budget] ), ALL() )
        )
    )
    

     you can always create SUM measures for Budget and % Complete and use those in above measure.

2 Replies

    • parry2k's avatar
      parry2k
      Super User

      ShubhamBarnwal try this measure

       

      % = 
      IF ( 
          HASONEFILTER( 'Table'[Desc] ), 
          SUM ( 'Table'[% Complete] ), 
          DIVIDE ( 
              SUMX ( 'Table',  CALCULATE( SUM ( 'Table'[Budget] ) ) * CALCULATE( SUM ( 'Table'[% Complete] ) ) ),
              CALCULATE( SUM ( 'Table'[Budget] ), ALL() )
          )
      )
      

       you can always create SUM measures for Budget and % Complete and use those in above measure.