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
Freekh
Frequent Visitor

Matrix row total not matching values

Hi,

 

I can't seem to calculate the correct weektotal. The values calculated per day are correct and need to be summed per week.

 

This is the formule is use:

Freekh_1-1638364121334.png

 

Below the values which are returned:

Freekh_0-1638363798360.png

 

The total I am looking for is 17+24+13+5+2 = 61

 

Is there a way to calculate this total?

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Try moving your first three variables inside so they are calculated for each date separately.

 

# Rest Pallets =
SUMX (
    ADDCOLUMNS (
        SUMMARIZE ( fct_Scanning, dimDate[Date], fct_Scanning[DC] ),
        "RestPallets",
            CALCULATE (
                VAR Pallets = [...]
                VAR FTL = [...]
                VAR WholeFTL = [...]
                RETURN
                    IF ( [...] )
            )
    ),
    [RestPallets]
)

View solution in original post

2 REPLIES 2
AlexisOlson
Super User
Super User

Try moving your first three variables inside so they are calculated for each date separately.

 

# Rest Pallets =
SUMX (
    ADDCOLUMNS (
        SUMMARIZE ( fct_Scanning, dimDate[Date], fct_Scanning[DC] ),
        "RestPallets",
            CALCULATE (
                VAR Pallets = [...]
                VAR FTL = [...]
                VAR WholeFTL = [...]
                RETURN
                    IF ( [...] )
            )
    ),
    [RestPallets]
)

Hi @AlexisOlson

 

Thanks a lot

 

It works!

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