Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Sum Measure across individual Columns

Hello,

 

I have a dataset that has # of loads for each week, then the AVG loads in the totals column. I have a measure (index1) that calculates the % difference from the avg, IF the # of loads for that week are > 0. Is there a way I can then sum the index1 values for each row? When I try to do this, it just uses the total of all weeks, rather than summing the values for each individual week.

 

Example (in yellow below): the avg loads across 5 weeks is 32. For each week, the index shows the % diff from the avg, IF > 0.

I want the total colum for index1 to show 0.59 (0.25 + 0.34), rather than 4.00, which is taking the % difference of the total loads for 5 weeks vs the avg.

 

 

I know about the possibility of using SUMX, SUMMARIZE, HASONEFILTER, ISFILTERED, etc. but I don't know how to apply it to this specific data.

 

Any ideas? Thanks in advance!

2 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you so much! This gave me exactly what I needed. One other question: do you know how I can sort my matrix by this new sum without it showing in each column? I'd be okay with it just being a subtotal column, but I don't need to see it at each week, if that makes sense.