Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Sum rows in dataset

Hello,

I have an Excel-dataset which looks like this:

 

4 Food260
 41 Fruits170
  411 Apple100
  412 Banana70
 42 Vegetables90
  421 Lettuce50
  422 Tomatoes40
5 Medicine 

 

Can PowerBI recognize the sum rows while importing the data? Is there an opportunity to mark rows as sum of the others? Or should the data be cleaned before importing to PowerBI?

 

Thanks for your help in advance.

 

Regards

 

Jenny

  • Hi Anonymous ,

     

    Power BI won't recognize the total rows automatically while importing the dataset. You may need to transform data. Please have a look at below workaround.

     

    Split the Category ID column.

       

     

    Result table.

     

    Use a Matrix to display data. Turn off "Stepped layout" option.

     

    Best regards,

    Yuliana Gu

4 Replies

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi Anonymous ,

     

    There are two columns in source dataset, right? What does each column refer to? 

     

    Can PowerBI recognize the sum rows while importing the data? Is there an opportunity to mark rows as sum of the others?

    What do you mean "sum rows"? What is your desired output in Power BI?

     

    Best regards,

    Yuliana Gu

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Yuliana,

       

      e.g. the category fruits is the sum of banana & apple as well as the category food is the sum of fruits and vegetables. My question is how PowerBI can recognize these rows as totals of the other while importing the dataset. Or if there is an opportunity to mark those rows as totals afterwards.

       

      Thanks

       

      Jenny

      • v-yulgu-msft's avatar
        v-yulgu-msft
        Microsoft Employee

        Hi Anonymous ,

         

        Power BI won't recognize the total rows automatically while importing the dataset. You may need to transform data. Please have a look at below workaround.

         

        Split the Category ID column.

           

         

        Result table.

         

        Use a Matrix to display data. Turn off "Stepped layout" option.

         

        Best regards,

        Yuliana Gu