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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Min of Sum

Hi,

 

how can I calculate the min values of summarized table? I tried several thing already with sumx in combination with min and summarize but still no luck. In the output table the first three columns are dimensions rest of should be calculated were the min of columns is the lowest value per Type summarized

 

 

Input Table:

 

DetailTypeSizeAmount
01. StraightStraightH2
01. StraightStraightL10
01. StraightStraightXS10
01. StraightStraightM2
01. StraightStraightS6
01. StraightStraightXL3
02. Small Small H3
02. Small Small L6
02. Small Small XS3
02. Small Small M9
02. Small Small S9
02. Small Small XL4
03. StraightStraightH6
03. StraightStraightL9
03. StraightStraightXS5
03. StraightStraightM6
03. StraightStraightS9
03. StraightStraightXL7
04. High High H1
04. High High L8
04. High High XS4
04. High High M2
04. High High S9
04. High High XL10
05. High High H1
05. High High L6
05. High High XS6
05. High High M8
05. High High S8
05. High High XL1
06. Medium Medium H7
06. Medium Medium L9
06. Medium Medium XS7
06. Medium Medium M1
06. Medium Medium S8
06. Medium Medium XL7
07. StraightStraightH1
07. StraightStraightL1
07. StraightStraightXS3
07. StraightStraightM9
07. StraightStraightS1
07. StraightStraightXL7
08. StraightStraightH8
08. StraightStraightL1
08. StraightStraightXS2
08. StraightStraightM7
08. StraightStraightS2
08. StraightStraightXL4
09. Small Small H8
09. Small Small L9
09. Small Small XS7
09. Small Small M3
09. Small Small S3
09. Small Small XL5
10. StraightStraightH7
10. StraightStraightL8
10. StraightStraightXS4
10. StraightStraightM3
10. StraightStraightS5
10. StraightStraightXL3
11. Small Small H3
11. Small Small L4
11. Small Small XS7
11. Small Small M10
11. Small Small S10
11. Small Small XL2
12. Small Small H8
12. Small Small L3
12. Small Small XS3
12. Small Small M9
12. Small Small S3
12. Small Small XL5
13. Small Small H3
13. Small Small L4
13. Small Small XS6
13. Small Small M8
13. Small Small S10
13. Small Small XL9
14. High High H6
14. High High L10
14. High High XS7
14. High High M7
14. High High S6
14. High High XL4
15. Medium Medium H3
15. Medium Medium L5
15. Medium Medium XS4
15. Medium Medium M6
15. Medium Medium S4
15. Medium Medium XL10
16. Small Small H3
16. Small Small L6
16. Small Small XS6
16. Small Small M1
16. Small Small S3
16. Small Small XL5

 

Output Table

SizeTypeSum of AmountMin ofDelta
HHigh 880
HMedium 1073
HSmall 28280
HStraight24231
LHigh 24816
LMedium 1477
LSmall 32284
LStraight29236
MHigh 1789
MMedium 770
MSmall 402812
MStraight27234
SHigh 23815
SMedium 1275
SSmall 382810
SStraight23230
XLHigh 1587
XLMedium 17710
XLSmall 30282
XLStraight24231
XSHigh 1789
XSMedium 1174
XSSmall 32284
XSStraight24231
1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Anonymous 
Please refer to attached sample file with the solution

1.png

Min of = 
SUMX (
    SUMMARIZE ( 'Table', 'Table'[Size], 'Table'[Type] ),
    MINX (
        CALCULATETABLE ( 
            SUMMARIZE ( 'Table', 'Table'[Size], 'Table'[Type] ),
            ALLEXCEPT ( 'Table', 'Table'[Type] )
        ),
        [Sum of Amount]
    )
)

 

 

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @Anonymous 
Please refer to attached sample file with the solution

1.png

Min of = 
SUMX (
    SUMMARIZE ( 'Table', 'Table'[Size], 'Table'[Type] ),
    MINX (
        CALCULATETABLE ( 
            SUMMARIZE ( 'Table', 'Table'[Size], 'Table'[Type] ),
            ALLEXCEPT ( 'Table', 'Table'[Type] )
        ),
        [Sum of Amount]
    )
)

 

 

Anonymous
Not applicable

Hello @Anonymous 
please follow the instruction:
i created a sample data from the bug table you provided,

then i summarzied the table with the following calculated table formula:

 

 

Summarized Table = SUMMARIZE(Powerbi,Powerbi[Size],Powerbi[Type],"Sum Of", SUM(Powerbi[Amount]))

 

 

Summarzied table.png

 

now create a new column:

 

 

Min Of = CALCULATE(MIN('Summarized Table'[Sum Of]),ALLEXCEPT('Summarized Table','Summarized Table'[Type]))

 

 

 

the allexcpet basically filters the min of sum for each size

now just add another column for delta

 

 

Delta = 'Summarized Table'[Sum Of] - 'Summarized Table'[Min Of]

 

 

Screenshot 2022-10-23 135950.png

 

if you find this post helpful id appreciate a kudos(like) and kindly accept this as a solution for other users

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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