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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
TBenders
Helper II
Helper II

Combining rows based on unique id, and combining information

Hi,

 

This is my first post on this forum, but I've been 'lurking' around for a while, learning as I go. Hopefully one of you BI-wizards can help me out with my particular case for which I couldn't find an anwser.

 

In my Power BI I have a table with id's and dates. I'm trying to combine the rows based on the id (so this column will be a unique identifier) while combining the data from the differen't columns.

Example of my table:

id

            StartDate

            FollowupDate

            FinishedDate

101

            1-1-2016

            null

            null

101

            null

            1-2-2016

            null

101

            null

            null

            2-2-2016

102

            3-1-2016

            null

            null

102

            null

            null

            5-1-2016

103

            3-1-2016

            null

            null

 

Result I'm trying to get:

id

StartDate

            FollowupDate

            FinishedDate

101     

1-1-2016

            1-2-2016

            2-2-2016

102

3-1-2016

            null

            5-1-2016

103

3-1-2016

            null

            null

 

I have a feeling this should be easy to do, but I've been searching around for quite a while without result.

 

Any idea how I can accomplish this in Power BI?

1 ACCEPTED SOLUTION

Sorry, forgot to mention that you need to turn the aggregation off: last step: Advanced Opions: Don't aggregate bofore hitting the last OK.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

22 REPLIES 22

I would create 2 tables which will be connected in the data model via UniqueID:

 

1) Header

image.png

 

2) Details:

image.png

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Amazing, this did exactly what I was looking for. 

 

Thanks Imke!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.