Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors