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
dez_im_ope
Regular Visitor

Group by on 244 columns - keep the value and remove the "null"

Hello all,

 

I creating a dashboard from a Form, which contains 2 sections. Each respondent has a unique case_number, the first day he will enter his case_number and answer Section A, then submit his form. the second day he will enter again his case_number, answer Section B and submit his form.

Therefore, in my database I have 2 rows for each case, but only 1 value per column per case (in the row for section A, all the columns of section B are empty, and vice-versa). As below :

dez_im_ope_0-1663779301996.png

 

And this what I need: 

dez_im_ope_1-1663779328868.png

to have only one row for each respondent.

 

Not that complicated with Max in Advanced Group By in PowerQuery... except I have 244 columns!!! And I need to keep them all...
Is there a way to group by my case_number and then to keep the value (instead of the "null") for all my columns?

 

Many many thanks for your support!

 

Ophelie

2 REPLIES 2
davehus
Memorable Member
Memorable Member

Hi @dez_im_ope ,

 

There's no easy way to do this. It's either create a view in your database with the data summarized or use the group by in Power Query (i'm not sure if there is a capacity limit). I'd be inclined to create a view upstream in the database if possible from a performance standpoint.

 

Hope this helps.

 

Did I help you today? Please accept my solution and hit the Kudos button.

Hello, thank for your help!
I am not sure to understand what you mean by "create a view upstream" ..?

I guess I will separate my dataset in 2 datasets and then merge them again

 

Thank you!

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.