Forum Discussion

rahkim's avatar
rahkim
Icon for Helper I rankHelper I
4 years ago
Solved

Custom Summary Total in Table Visual

Greetings!

 

I am using a table visual with three columns (starting and ending dollars, and a percentage of the difference).  I would like to have the percentage at the bottom show the percentage difference between the overall starting and ending dollars.  How is this possible?  If I choose for the percentage column to summarize at the bottom, it will just add the percentages, which is not accurate.

 

 

 

Thanks!

  • hi rahkim 

     

    Can you adjust measure to following. I haven't tested syntax. If it does not work, I'll correct in the morning as I am currently on phone.

     

    Measure = 

    VAR _1 = SUMX ( Table , Table[Start Dollars] )
    VAR _2 = SUMX ( Table , Table[End Dollars] )
    VAR _3 = ( _1 - _2 ) / _1

    RETURN

    IF ( _3 = 0 , 0 , _3 )

     

9 Replies

  • TheoC's avatar
    TheoC
    Icon for Community Champion rankCommunity Champion

    Hi rahkim 

     

    Create three measures if you want to use the total amounts on their own down the track:

    Measure 1 = SUM ( Table[Start Dollars] )
    Measure 2 = SUM ( Table[End Dollars] )
    Measure 3 = ( [Measure 1] - [Measure 2] ) / [Measure 1] 

     

    Otherwise, if it's a once off, you can use a single measure:

     

    Measure = 

    VAR _1 = SUM ( Table[Start Dollars] )
    VAR _2 = SUM ( Table[End Dollars] )
    VAR _3 = ( _1 - _2 ) / _1

    RETURN

    IF ( _3 = 0 , 0 , _3 )

     

    All the best!

    Theo 🙂

     

    • rahkim's avatar
      rahkim
      Icon for Helper I rankHelper I

      Thanks for the reply. 

       

      I really want the visual to look exactly the same, but instead of the -2802.54% at the bottom, I want to see the % of the two totals at the bottom.  So the % for each row is accurate, but the table visual doesn't allow me (from what I can tell) to show the % of the totals.  It seems that you can only choose from this of options:

       

       

      Thanks

      • TheoC's avatar
        TheoC
        Icon for Community Champion rankCommunity Champion

        rahkim if you click on the "Show Value As" it should be another drop down with the option.

  • Hi,

    From the image that you have shared, do you want to see the % difference between US$20.5 million and US$19.78 million?  Share the link from where i can download your PBI file?