cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
irnm8dn Member
Member

Sum repeating rows as one

Newbie to Power BI.  Looking for some help regarding repeating rows.

 

I have a dataset that has repeating rows because the data is presented by day.  The column is a "goal" and is for a specific duration of time, and not for the specific day.  When visualized, the "goal" because it is listed in each of the rows is "summed".  Is there a way not to have this totaled, and use the value independently?

 

i.e.   Joe wants to lose 100lbs in 90 days.  "100 lbs" is repeated in each of the 90 rows (each day).  Power BI currently makes this look like Joe's goal is to lose 9000 lbs.  (100 lbs * 90 days).

 

Thanks in advance for any help you can provide.

 

@MattAllington

 

6 REPLIES 6
mwaltercpa Regular Visitor
Regular Visitor

Re: Sum repeating rows as one

If it's just for aesthetics in a table, have you tried changing the field in the table to show as the 'average' rather than the 'sum'?  That way every day will still show 100, but your totals will also reflect 100 as the average of all the repeated goal amounts.

 

To work with this goal amount independently, say in a DAX measure, the goal should be removed from the table that holds the daily rows (since 100 doesn’t really mean anything to a particular day), and listed separately in to its own 'dimension' table', one row for just Joe, with a goal of 100 (along with the other customers and goals).

 

Relating these two tables together on customer# will let you work with the goal in a DAX Calculate() measure if need be.  You'll be able to use the related goal against any other aggregation from your detail log. i.e. if you keep track daily of each pound lost, you could sum the total pounds lost (from the detail table), then compare them to the goal of 100 from the goal table. 

 

Hope this helps.

v-haibl-msft Super Contributor
Super Contributor

Re: Sum repeating rows as one

@irnm8dn

 

Please try to check Don’t summarize but not Sum in the dropdown menu.

 

Sum repeating rows as one_1.jpg

 

Best Regards,

Herbert

irnm8dn Member
Member

Re: Sum repeating rows as one

Thanks Herbert.   I think this may get me close, but with the end in mind - perhaps a different example will help illustrate the challenge I am having.  I have a flat dataset but there is a hierarchical relationship within the dataset of:

 

Advertiser>Campaign>Order or put another way...Orders are properties of a Campaign, Campaigns are properties of an Advertiser.

 

Since the information is presented "by day" for each row, there is certain data from my source system that is "static", and other data that needs to be summed, etc.  See the sample dataset below, along with the questions I am trying to answer and how I would want to present it in Power BI.  In the past, I would have pivoted it in Excel (also below) and I can't quite put my thumb on whether I should leverage a "Group By" or "Pivot" function in Power BI (which I can't quite figure out anyway).

 

Sample Dataset.PNG

Pivoted below, this is what I am looking to reproduce in a more visual way in Power BI:

 

Pivot.PNG

 

Basically, the questions I am trying to answer are as follows:

 

  • How many Orders have I delivered against my Order Goal?
  • How many Orders have I delivered against my Camapign Goal?
  • What/How Many Orders belong to a Campaign?
  • What are my Toal Order goals for all my campaigns (1,000)?  (Power BI would make this look like 5,200)

Hopefully this sheds some more light on my current limitation.  I am sure it is a rather simple solution, but being a newbie - I am trying to get out of my own way (with your help).  Thanks. 

Vvelarde Super Contributor
Super Contributor

Re: Sum repeating rows as one

@irnm8dn

 

Try with a matrix visual that look like this:

 

Matrix.png




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




irnm8dn Member
Member

Re: Sum repeating rows as one

Great call on the matrix view, however looking to do something more visual.  I know the issue is inherently that the hierarchical data repeats.  Any other suggestions?

Highlighted
v-haibl-msft Super Contributor
Super Contributor

Re: Sum repeating rows as one

@irnm8dn

 

The matrix visual should be same as the pivoted table in excel. Do you want to look for some other visuals? Except the built-in visuals in Power BI Desktop, you can also find some awesome visuals in https://app.powerbi.com/visuals/. Maybe you can take a look.

 

Best Regards,

Herbert

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 203 members 2,426 guests
Please welcome our newest community members: