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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Jelto83
Frequent Visitor

Pivot Data into Lists without Aggregation/Counting or Summing the data

Hi,

 

I'm sure that this is going to be an easy solution for someone out there, but it's had me in circles the last few days.

 

Requirement: Users require a dynamic dependent dropdown list where they first select their supplier and then they can select only a SKU assigned to the supplier. Data is in PowerQuery table and is not sorted.

 

Problem: I have a solution already in excel however as the data is in a table which originates from PowerQuery, each time the query refreshes the data range in the table changes and the formaule doesn't grow/contract accordingly. I could use VBA but I'm sure there must be a way to get the below in PQ without excel heavy formulae and is dynamic.

 

Data Sample:

Jelto83_0-1613036140228.png

 

Desired Output (if possible):

Not to bothered if the Supplier ID is the header with SKU's in rows beneath OR if the Supplier ID is down the side with the SKU's going left to right in same row - this is how my current EXCEL solution is working as I can then offset the Data Validation List function accordingly.

Jelto83_1-1613036177846.png

 

I'm sure this is really easy to do but each time I try GROUP BY - Don't Aggregate or PIVOT the data it sums/counts the SKU values and not displays the SKU values.

 

Thanks in advance and hope the above is all clear!

 

Hannah

1 ACCEPTED SOLUTION
Jelto83
Frequent Visitor

I've found an iterim own solution to this. I had to add an INDEX Column before Pivoting the data with out Aggretating it and it worked. Now have to format the data around but in essence it has sort of worked.  Would still love a better solution in the longterm - I'm guessing some sort of incremental counter against each Supplier ID

 

View solution in original post

6 REPLIES 6
Smauro
Solution Sage
Solution Sage

Hi @Jelto83 

 

You could try this, as a new step:

.

let
    names = List.Distinct(Source[SupplierNumber])
in
    Table.FromColumns(Table.Transpose(Table.Pivot(Source, names, "SupplierNumber""SKU"each _))[Column1], names)

 

 

Changing Source to your previous step's name.




Spyros Mavroforos

Data Consultant


Find me on LinkedIn or drop me an email

eSpyros

Jelto83
Frequent Visitor

I've found an iterim own solution to this. I had to add an INDEX Column before Pivoting the data with out Aggretating it and it worked. Now have to format the data around but in essence it has sort of worked.  Would still love a better solution in the longterm - I'm guessing some sort of incremental counter against each Supplier ID

 

Hi @Jelto83 ,

 

Provide some sample data with expected output here,we would try to give some better solution on it.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

 

 

Anonymous
Not applicable

i think the table.group function is for you. If you submit a sample table, we can try it

Anonymous
Not applicable

you should do somethink like this:

 

let
.....
  your previuos steps
LastStep= somefunction(ofsomethonk)
.....
    #"Modificato tipo" = Table.TransformColumnTypes(LastStep,{{"sn", type text}, {"sku", type text}}),
    rr = Table.Group(#"Modificato tipo", {"sn"}, {{"skALL", each _[sku]}}),
    tfc=Table.FromColumns(rr[skALL],rr[sn])
in
tfc

No problem and thank you!

 

What is the best way to submit a sample table (sorry also new to this site!) 😁

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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