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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
marcio_fornari
Resolver I
Resolver I

Get a min from summarise table

Hi Everyone,

How can i get the min value from this table created in Dax:

 

marcio_fornari_0-1628276855026.png

 

EVALUATE
var t = SUMMARIZE(
	F_CUSTO_FRANGO,
	F_CUSTO_FRANGO[Ano-Mes],
	"Total", sum(F_CUSTO_FRANGO[Total Final]
	)
)
return
t

 

I need the min of the sum, i think a a summarize table and get the min, i don't know if is better way..

3 ACCEPTED SOLUTIONS
Jos_Woolley
Solution Sage
Solution Sage

Hi,

You could use this measure:

 

MinSum =
MINX (
    SUMMARIZE (
        F_CUSTO_FRANGO,
        F_CUSTO_FRANGO[Ano-Mes],
        "Total", SUM ( F_CUSTO_FRANGO[Total Final] )
    ),
    [Total]
)

 

Regards

View solution in original post

CNENFRNL
Community Champion
Community Champion

=
MINX(
    SUMMARIZECOLUMNS(
        F_CUSTO_FRANGO[Ano-Mes],
        "@Total", SUM( F_CUSTO_FRANGO[Total Final] )
    ),
    [@Total]
)

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

Fowmy
Super User
Super User

@marcio_fornari 

To aggregate over a virtual table, you can use an iterator function: with the dame code you have, add the following:

EVALUATE
VAR t =
    SUMMARIZE (
        F_CUSTO_FRANGO,
        F_CUSTO_FRANGO[Ano-Mes],
        "Total", SUM ( F_CUSTO_FRANGO[Total Final] )
    )
RETURN
    MINX ( t, [Total] )

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

5 REPLIES 5
vishal097
Helper II
Helper II

Hello All,

 

I have the similar requirement where I want Sum of Minimum QTY in each SFC ( there are multile record at SFC level ) from Summarize Table 

vishal097_3-1662559688831.png

I have tried Measure as 

Units Produced Within Standard Time =
VAR Result =
SUMX(
SUMMARIZE (
Fact_DailyMgmt_ThroughputTime_Detail,
Fact_DailyMgmt_ThroughputTime_Detail[SFC],
Fact_DailyMgmt_ThroughputTime_Detail[START_TIME],
Fact_DailyMgmt_ThroughputTime_Detail[END_TIME],
Fact_DailyMgmt_ThroughputTime_Detail[Wait_Time_Type],
"QTY", FIRSTNONBLANK ( Fact_DailyMgmt_ThroughputTime_Detail[QTY], 0 ),
"IsEligible",
IF (
SUM ( Fact_DailyMgmt_ThroughputTime_Detail[Throughput_Time] )
<= SUM ( Fact_DailyMgmt_ThroughputTime_Detail[ERP_Target] ),
1 , BLANK() ) ) , [QTY] * [IsEligible] )

RETURN

Result
 
but it is giving sum of QTY for all due to which value is not correct 
 
can someone please help.

 

marcio_fornari
Resolver I
Resolver I

Thank you so much everyone! 
it's to easy! OMG 😅

Fowmy
Super User
Super User

@marcio_fornari 

To aggregate over a virtual table, you can use an iterator function: with the dame code you have, add the following:

EVALUATE
VAR t =
    SUMMARIZE (
        F_CUSTO_FRANGO,
        F_CUSTO_FRANGO[Ano-Mes],
        "Total", SUM ( F_CUSTO_FRANGO[Total Final] )
    )
RETURN
    MINX ( t, [Total] )

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

CNENFRNL
Community Champion
Community Champion

=
MINX(
    SUMMARIZECOLUMNS(
        F_CUSTO_FRANGO[Ano-Mes],
        "@Total", SUM( F_CUSTO_FRANGO[Total Final] )
    ),
    [@Total]
)

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Jos_Woolley
Solution Sage
Solution Sage

Hi,

You could use this measure:

 

MinSum =
MINX (
    SUMMARIZE (
        F_CUSTO_FRANGO,
        F_CUSTO_FRANGO[Ano-Mes],
        "Total", SUM ( F_CUSTO_FRANGO[Total Final] )
    ),
    [Total]
)

 

Regards

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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