Forum Discussion

S44MSM's avatar
S44MSM
New Member
6 years ago

Dax Formula For Sum Rows

Hi I'm new to Power Bi so this probably is a really simple question

 

All i am trying to do is add a sub total column to add up the vales for each day

 

 06 April 202007 April 202008 April 202009 April 2020Total
Day Rate7159017492179181738670258
Plant760173917391739129775
Fuel390038503950385015550
Materials9888840498888569

36749

Sub Con27900273693129427741

114303

Total????

?

 
 

4 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    If your source data is actually formatted like that, unpivot all of your day columns so that you end up with 2 columns. Then you can use a matrix visualization and not do any work what-so-ever.

     

    Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

    The most important parts are:
    1. Sample data as text, use the table tool in the editing bar
    2. Expected output from sample data
    3. Explanation in words of how to get from 1. to 2.

    • S44MSM's avatar
      S44MSM
      New Member

      I have used the matrix visulisation tool, to pull the data to make this table

       

      My data isnt set out in this table, the tabel is a result of the matrix

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi S44MSM ,

     

    Assuming that your table looks like this.

     

     

     

    Convert the attribute column to Date/Time.

     

     

     

    Pull the matrix visualization, to get the desired output.

     

    Regards,

    Harsh Nathani

     

    Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi S44MSM ,

       

      Did the solution work for you.

       

      Please mark as solution for other community members to benefit.

       

      Regards,
      Harsh Nathani
      Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)