Forum Discussion

7 Replies

    • mussaenda's avatar
      mussaenda
      Community Champion

       

      Actually, they asked me to do the same format as the attached photo. Is it possible? If not, are there other ways to show the grand total on another column?

      • parry2k's avatar
        parry2k
        Super User

        mussaenda I dont think there is straight forward way to do this but with some DAX measures I believe we can achieve this. Can you share sample data in excel via onedrive/google drive, remove any sensitive data.

         

         

  • v-chuncz-msft's avatar
    v-chuncz-msft
    Community Support

    mussaenda ,

     

    You may drag the following calculated column to Rows.

    Column =
    SUMX (
        FILTER ( Table1, Table1[Grade] = EARLIER ( Table1[Grade] ) ),
        Table1[QTY]
    )
    
    • mussaenda's avatar
      mussaenda
      Community Champion

      Hi v-chuncz-msft ,

      The calculated column might be correct but it is giving me this error:

      A circular dependency was detected: Load/Unload[Column].

       

      For the qty measure, here is my formula:

      Stock Qty = 
      
      CALCULATE([Total Carico Qty],
                       FILTER(ALL('Date Table'), 
                          'Date Table'[Date] <= MAX('Date Table'[Date]))) - 
      CALCULATE([Total Scarico Qty],
                      FILTER(ALL('Date Table'),
                          'Date Table'[Date] <= MAX('Date Table'[Date])))

      Thank you for your help!