cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mjwssc
Frequent Visitor

Roundup Measure not summing correctly across matrix rows and columns

I need help. 

 

I am trying to use a measure with roundup for multiple territories over the course of different months. The values within the matrix are calculating correctly, but I can't get the row totals and column totals to total the correct amounts. I have looked through multiple posts and when I fix one issue it breaks another. 

 

Here is the measure I used to calculate the monthly quota by territory based on the previous 6 months of data. I am not sure if this is where the problem lies if I need to add logic to calculate at the territory level here.

 

Quota =
     Roundup(CALCULATE('MT Quota'[Baseline],all(Quota[Order Date]),
DATESBETWEEN('Calendar'[DATE],[QuotaStartDate],[QuotaEndDate]))/6,0)
 
Here is the measure I used to try and fix the row and column totals (unsuccessfully). 
Test =
     VAR _Test =
          SUMMARIZE(Quota,Quota[Sales Territory],"_value",[Quota])
          Return
               if(HASONEVALUE(Quota[Sales Territory]),
               [Quota],
               SUMX(_Test,[_value])
               )
 
PBIX and sample file located here:
 
Any help is appreciated! 
1 ACCEPTED SOLUTION

@mjwssc 
Please refer to attached sample file with the solution

1.png

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @mjwssc 

There in no PBIX file in the link

@mjwssc 
Please refer to attached sample file with the solution

1.png

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors
Top Kudoed Authors