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
PrakashPalle
Helper II
Helper II

Group by ID Skip Aggregation

Hi Power BI Experts,

How can i acheive the below expected output. Please share the dax code.

 

PrakashPalle_0-1717658088284.png

 

2 ACCEPTED SOLUTIONS
ryan_mayu
Super User
Super User

Could you pls provide some sample data?

 

maybe you can this

avg = AVERAGE('Table'[QUANTITY])
avg2 = sumx(VALUES('Table'[ID]),[avg])
 
11.PNG




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

Proud to be a Super User!




View solution in original post

Anonymous
Not applicable

Thanks for the reply from @ryan_mayu , please allow me to provide another insight:
Hi,@PrakashPalle 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

vlinyulumsft_0-1717736694290.png

2.Then add the index column to the powerquery:

vlinyulumsft_1-1717736702204.png

3.Create calculated column references:

Column = 
VAR FIRST=CALCULATE(MIN('MAIN'[Index]),ALLEXCEPT(MAIN,'MAIN'[ID]))
RETURN IF('MAIN'[Index]=FIRST,'MAIN'[Quanlity],BLANK())

Column 2 = 
VAR CI='MAIN'[ID]
VAR RANKC=RANKX(FILTER('MAIN','MAIN'[ID]=CI),'MAIN'[Index],,ASC,Dense)
RETURN IF(RANKC=1,'MAIN'[Quanlity],BLANK())

I've given you two options that you can choose according to your needs.

 

5.Here's my final result, which I hope meets your requirements.

vlinyulumsft_2-1717736756238.png

Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.


Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thanks for the reply from @ryan_mayu , please allow me to provide another insight:
Hi,@PrakashPalle 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

vlinyulumsft_0-1717736694290.png

2.Then add the index column to the powerquery:

vlinyulumsft_1-1717736702204.png

3.Create calculated column references:

Column = 
VAR FIRST=CALCULATE(MIN('MAIN'[Index]),ALLEXCEPT(MAIN,'MAIN'[ID]))
RETURN IF('MAIN'[Index]=FIRST,'MAIN'[Quanlity],BLANK())

Column 2 = 
VAR CI='MAIN'[ID]
VAR RANKC=RANKX(FILTER('MAIN','MAIN'[ID]=CI),'MAIN'[Index],,ASC,Dense)
RETURN IF(RANKC=1,'MAIN'[Quanlity],BLANK())

I've given you two options that you can choose according to your needs.

 

5.Here's my final result, which I hope meets your requirements.

vlinyulumsft_2-1717736756238.png

Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.


Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ryan_mayu
Super User
Super User

Could you pls provide some sample data?

 

maybe you can this

avg = AVERAGE('Table'[QUANTITY])
avg2 = sumx(VALUES('Table'[ID]),[avg])
 
11.PNG




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

Proud to be a Super User!




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