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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Total Sum + average at the bottom of a matrix

Hi Power BI Community,

 

I'm struggling in calculating/displaying the Total Sum at the bottom of a matrix for my Hourly Effective Production measure.

Yet you can see that the total for Number of operators is quite good calculated.

 

Here is a screenshot of the matrix :

vtalim-scs_0-1618571168082.png

 

Here is the DAX formula for Hourly Effective Production measure :

Hourly Effective Production = CALCULATE(COUNT(ZOT[OT Number]),FILTER(ZOT,ZOT[Confirmation Date] = TODAY() && NOT(ISBLANK(ZOT[Confirmation Date])) && ZOT[Confirmation HH:00] = MAX('Capacity'[Hour])))

 

The expected total for Hourly Effective Production would be 1136 (329 + 405 + 401 + 1)

 

About the Hourly Objective Production Total, I would need to calculate an average of this.

Hourly Objective Production = MAX('Capacity'[number of operators])*125
 
The expected total for Hourly Objective Production would be 684
 

Do you know how I could handle these cases, please?

 

Thank you for your help.

BR

Vincent.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @v-easonf-msft 

 

Thanks for your suggestions.

This formula works perfectly !

New Hourly Effective Production1 = SUMX ( VALUES ( Table[Hour] ), [Hourly Effective Production] )

 

Best regards,

Vincent. 

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous , Try a new measure like

Hourly Effective Production = sumx(values(Table[Hour]), CALCULATE(COUNT(ZOT[OT Number]),FILTER(ZOT,ZOT[Confirmation Date] = TODAY() && NOT(ISBLANK(ZOT[Confirmation Date])) && ZOT[Confirmation HH:00] = MAX('Capacity'[Hour]))))

Anonymous
Not applicable

Hi @amitchandak 

 

Thank you for your suggestion, unfortunately, I still don't have a value in the total bottom line.

vtalim-scs_0-1618584341207.png

 

Is it related to the fact that there are empty values from 16:00 to 21:00 ?

BR 

Vincent.

Hi, @Anonymous 

Can you provide some sample data for testing?

Maybe you can try formulas as below:

 

New Hourly Effective Production1 =
SUMX ( VALUES ( Table[Hour] ), [Hourly Effective Production] )

 

or

 

New Hpourly Effective Production2 =
SUMX (
    SUMMARIZE (
        Table1,
        Table1[Hour],
        Table1[Bumber of operators],
        "Hourly Effective Production",
            CALCULATE (
                COUNT ( ZOT[OT Number] ),
                FILTER (
                    ZOT,
                    ZOT[Confirmation Date] = TODAY ()
                        && NOT ( ISBLANK ( ZOT[Confirmation Date] ) )
                            && ZOT[Confirmation HH:00] = MAX ( 'Capacity'[Hour] )
                )
            ) + 0
    ),
    [Hourly Effective Production]
)

 

BTY,Why the Hourly Objective Production would be 684,can you explain it in more detail?

 

Best Regards,
Community Support Team _ Eason

 

 

Anonymous
Not applicable

Hi @v-easonf-msft ; @amitchandak 

 

@v-easonf-msft : I haven't tested yet your suggestions, but please find the URL for downloading the pbix file as a sample.

https://we.tl/t-MqdNeNSIzw 

 

About the 684, figures have changed since last post.

Taking in account the sample.pbix, please now consider the following table with the expected results in the Total line in the bottom :

vtalim-scs_0-1618925899416.png

 

Thank you for your support.

Best regards,

Vincent.

Anonymous
Not applicable

Hi @v-easonf-msft 

 

Thanks for your suggestions.

This formula works perfectly !

New Hourly Effective Production1 = SUMX ( VALUES ( Table[Hour] ), [Hourly Effective Production] )

 

Best regards,

Vincent. 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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