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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
DorisCMoore
Frequent Visitor

Total of MAX values in a Table

Hello,

 

I'm having a table showing Max values of an attribute.

The Total row in this table shows the Max value in the table instead of the Sum of all the Max values.

DorisCMoore_3-1677744988566.png

Whether I use "Remaining Work" which is a column in my Data Model inserted as Maximum

DorisCMoore_2-1677744965839.png

or "Workload" which is a Measure (Workload = MAX(AllWorkItems[Remaining Work])))

doesn't change anything.

 

What should I change to have the Total be a Total and not the Max possible value in my Table?

 

Thank you,

Doris

4 REPLIES 4
danextian
Super User
Super User

hI @DorisCMoore ,

 

Try this:

= SUMX( Values ('table'[Column] ), MAX ('table'[Remaining Work] ) )

Replace 'table'[Column] with the first colum in your visual.

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
mona_minchi
Frequent Visitor

Hi, 

Max of Remaining Work =
SUMX(
    ADDCOLUMNS(
        SUMMARIZE(AllWorkItems,AllWorkItems[Remaining Work]
        ),
        "Workload",
            CALCULATE(MAX(AllWorkItems[Remaining Work]))
    ),
    [Workload]
)


For the solution please refer to:
Solved: Calculate sum of the max values (show in rows) in ... - Microsoft Fabric Community

MAwwad
Super User
Super User

 

The reason why the total row in your table is showing the maximum value instead of the sum of all maximum values is because the "Total" row is not taking into account the aggregation performed in the "MAX" function.

To solve this issue, you can create a new measure that calculates the maximum value across all rows in the table, and then sum that new measure in the total row.

Here's an example measure that you can use:

 

 
MaxValue = MAX(AllWorkItems[Remaining Work])
 

Thank you @MAwwad for your answer.

But I'm afraid I'm missing something here.

 

The measure you propose is the one I already created:

Workload = MAX(AllWorkItems[Remaining Work]))

 

When I use it, the result is the same and there is no Sum option in that case

DorisCMoore_0-1677752346135.png

 

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

Top Solution Authors