Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

how to do SUM 2 filelds in same column

 

How to sum NET_SALES of both bbcode JETIN IN and SJET IN baseed on YYYYMM.

YYYYMM[FYMAR-10][NET_SALES] + YYYYMM[FYMAR-10][NET_SALES] based on BBCODE.

 

OUTPUT shlouls be like this

 

 

and output should be in Row below the second total.

4 Replies

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

    Anonymous If you want to transform the data and to have final output in the YYYYMM and Net Sales only. Then, please use "Group By" option in "Power Query Editor" group on YYYYMM field and SUM the Net Sales. If you just want to show in visual only, then use the YYYYMM field to the table and Net Sales field (which will do the aggregation as sum).

     

    Hope this helps !!

  • v-piga-msft's avatar
    v-piga-msft
    Icon for Resident Rockstar rankResident Rockstar

    Hi Anonymous,

     

    For your requirement, you could try the measure with dax expression below.

     

    Measure = CALCULATE(SUM(Table1[Sales]),ALLEXCEPT(Table1,'Table1'[YYYYMM]))

    Here is my test output.

     

     

    Best Regards,

    Cherry

    • Anonymous's avatar
      Anonymous
      Not applicable

      v-piga-msft

       

      I have attached my file. Am not getting the exact total.

       

      Kindly help me on this.

      • v-piga-msft's avatar
        v-piga-msft
        Icon for Resident Rockstar rankResident Rockstar

        Hi Anonymous,

         

        Could you please share a dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)

         

        Best  Regards,

        Cherry