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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Add only the first row of each Order

Hi all !

I have the following table:

 

IDOrder NumberValue

1

12
212
312
421
521
634
734
846
946
1046

 

And I need to get these results for every order number:

 

Order NumberValue
12
21
34
46

 

Is it possible to make a measure in DAX that only takes into account the first value of each order number?

 

Thanks!

Regards!

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

Drag Order to the Table visual and write this measure

=min(Data[NumberValue])


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could create a table with the following DAX:

New Table =
DISTINCT (
    SELECTCOLUMNS ( 'Table', "Order Number", 'Table'[Order Number], "Value", 'Table'[Value] )
)

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

 

Measure = SUMX(SUMMARIZE('Table','Table'[Order Number],'Table'[Value]),'Table'[Value])
 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Anonymous
Not applicable

Hi @Ashish_Mathur @Ashish_Mathur  @v-eachen-msft @AlB @az38  !!

Here's how I solved it:

 

Total =
SUMX (
ADDCOLUMNS (
SUMMARIZE ( Fact_Table, Fact_Table[ID] ),
"@Valor", CALCULATE(MAX ( Fact_Table[Value] ))
),
[@Valor]
)

Thanks for your help!

AlB
Community Champion
Community Champion

Hi @Anonymous 

1.Place Table1[Order] in a table visual

2. Place this measure in the visual

Measure =
VAR firstID_ =
    MIN ( Table1[ID] )
RETURN
    CALCULATE ( DISTINCT ( Table1[Number Value] ), Table1[ID] = firstID_ )

Please mark the question solved when done and consider giving kudos if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

 

az38
Community Champion
Community Champion

@Anonymous 

you can do it in visual setings, if you will set Value field aggregation as First, Minimum, Average or Maximum, doesn't matter


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors