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

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

Reply
Anonymous
Not applicable

Grouping in Power Query

Dear all,

Can anyone explain of how to group rows in Power Query based on whether all proper cells in column "Date" contain value or not.

Example with some more information below.

Urmas_0-1643728097954.png

Thanks in advance,

Urmas

1 ACCEPTED SOLUTION

  1. Add an Index column
  2. Add a custom column with a formula similar to:  =if [Date] <> null then [Index] else null
    1. If the blank dates are not "null", you may need a different comparison:  eg [Date] <>""
  3. Fill down the custom column
  4. Group by {"Account no.","Entry number","Custom"}
  5. Then you can add a custom aggregation of a concatenated "Explanation"

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thank you. Solution works perfectly:

Regards,

 

Urmas

AlexisOlson
Super User
Super User

So you want to remove the rows where [Entry number] starts with "TA" in this example?

Anonymous
Not applicable

I would like to achieve following:

 

Current situation:

Entry noDateDescription
TA 320.02.2017

Ettemaks Algsaldo Maksude

TA 3 

ettemaksukonto (31.12.2016) Maksu- ja

TA 3 

Tolliamet

Final situation:

Entry noDateDescription
TA 3 20.02.2017Ettemaks Algsaldo Maksude ettemaksukonto (31.12.2016) Maksu- ja Tolliamet

 

In other words to merge rows with similar Entry no in order to have the description in one cell but only in cases where the date is missing in respective cells. If there is date in all respective cells it is different description and should not be merged.

 

I hope it added some clarity.

 

Regards,

 

Urmas

  1. Add an Index column
  2. Add a custom column with a formula similar to:  =if [Date] <> null then [Index] else null
    1. If the blank dates are not "null", you may need a different comparison:  eg [Date] <>""
  3. Fill down the custom column
  4. Group by {"Account no.","Entry number","Custom"}
  5. Then you can add a custom aggregation of a concatenated "Explanation"

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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 Kudoed Authors