cancel
Showing results for 
Search instead for 
Did you mean: 
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
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors