cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
audi357 Frequent Visitor
Frequent Visitor

Pivot

I have a table it has a key field that has duplicate numbers which I need to piviot each key field into 1 row.   I have tried pivot and unpivot but nothing is seeming to work, can you assist?

 

sample.JPG

6 REPLIES 6
Microsoft v-cherch-msft
Microsoft

Re: Pivot

Hi @audi357

 

You may use 'Merge Queries' in query editor to get the table. Update the sample file for your reference. Please let me know if it helps you.

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
audi357 Frequent Visitor
Frequent Visitor

Re: Pivot

This solution does work! However I have a small issues I have multiple "NC_SEQ" it can be up to 50 (1-50), This solution accounts for up to two (1-2) "NC_SEQ". Is there and easy adjustment for this query?

Microsoft v-cherch-msft
Microsoft

Re: Pivot

Hi @audi357

 

Add some rows and steps for sample data. You may check if it matches your request. Here is the sample file.

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
audi357 Frequent Visitor
Frequent Visitor

Re: Pivot

The first sample only 1  unique "key" which is correct.  This sample would not give the desired results.  

 

In the first sample I added multiple steps  "Merge3 (nc_seq = 3), merge4 (nc_seq=4), merge5 (nc_seq=5)" then Merged them all together adding one at a time.  This does work.  However I will need to create a total of 50 steps.  Is there a better solution?  

Microsoft v-cherch-msft
Microsoft

Re: Pivot

Hi @audi357

 

I'm afraid i cannot reproduce your scenario. Maybe you need change the filter rows with other conditon such as 'dose not equal'.

1.png

 

Regards,

Cherie 

 

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User IV
Super User IV

Re: Pivot

Hi,

 

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors