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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

How to replace value row with null value under same column condition

Hi all,

 

Want to ask do we have any formulation to replace the completed qty with only 1 value based on the same order & document date

 

Current

nuhasan_1-1652948856308.png

 

What I expect. The goal is to sum all the completed qty for different order & document date.

nuhasan_2-1652948985072.png

 

Regards,

Nuha

 

1 ACCEPTED SOLUTION

Hi @Anonymous 

 

I would suggest using the Group By feature. Select the first four columns and click on "Group By" in Transform ribbon. For the new column, select Max operation on Completed column.  

vjingzhang_0-1653385416769.png

 

Then you will have a distinct row for every combination of the first four columns with the distinct Completed Qty value.

vjingzhang_1-1653385736328.png

 

If you want to keep all detailed information in other colulmns, you can duplicate the query first, then perform group by in the duplicated query. It will be easier to use this new table to calculate the sum. 

vjingzhang_2-1653386206132.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

OrderDocument DateMaterialMaterial descriptionCompletedBase Unit of MeasureMaterialMaterial descriptionQuantityBase Unit of Measure
10000133094510/4/2022M0000006546620 NO.744S 6MMX200M STD1,379.000ROLM0000000628NO.744S(NMM) 550X2000M-1.000ROL
10000133094510/4/2022M0000006546620 NO.744S 6MMX200M STD1,379.000ROLM0000000840ABSCORE 6-1,380.000PC
10000133094510/4/2022M0000006546620 NO.744S 6MMX200M STD1,379.000ROLM0000002225CARTON BOX R-5-27.000PC
10000133094510/4/2022M0000006546620 NO.744S 6MMX200M STD1,379.000ROLM0000002261D/CUT PAD RR-4-22.000PC
10000133094510/4/2022M0000006546620 NO.744S 6MMX200M STD1,379.000ROLM0000002261D/CUT PAD RR-4-32.000PC
10000133094510/4/2022M0000006546620 NO.744S 6MMX200M STD1,379.000ROLM0000002264CREASE PAD RT-1-27.000PC
10000133094510/4/2022M0000006546620 NO.744S 6MMX200M STD1,379.000ROLM0000002283LDPE PLASTIC BAG 560MM X 680MM X 0.03MM-27.000PC
10000133094510/4/2022M0000006546620 NO.744S 6MMX200M STD1,379.000ROLM0000002291HDPE PLS SPACER 75MMX250MMX0.04MM-1,406.000PC
10000133094510/4/2022M0000006546620 NO.744S 6MMX200M STD1,379.000ROLM0000003636LABEL (NITTO DENKO) 152MM X 102MM (NEW)-31.000PC
10000133094510/4/2022M0000006546620 NO.744S 6MMX200M STD1,379.000ROLM0000008234000 NO.744S 550MMX2000M BAL STA-440.000M2
10000133094510/4/2022M0000006546620 NO.744S 6MMX200M STD1,379.000ROLM0000008234000 NO.744S 550MMX2000M BAL STA-275.000M2

Hi @Anonymous 

 

I would suggest using the Group By feature. Select the first four columns and click on "Group By" in Transform ribbon. For the new column, select Max operation on Completed column.  

vjingzhang_0-1653385416769.png

 

Then you will have a distinct row for every combination of the first four columns with the distinct Completed Qty value.

vjingzhang_1-1653385736328.png

 

If you want to keep all detailed information in other colulmns, you can duplicate the query first, then perform group by in the duplicated query. It will be easier to use this new table to calculate the sum. 

vjingzhang_2-1653386206132.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Vijay_A_Verma
Super User
Super User

Can you post the first picture as table? Refer to this - How to provide sample data in the Power BI Forum - https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Ideal will be to upload the file without confidential/sensitive data to a cloud storage service such as Onedrive/Google Drive/Dropbox/Box (Onedrive preferred) and share the link here.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.

Top Solution Authors
Top Kudoed Authors