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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.