Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I have a table with articles, the problem is that i have one colum(kenmerk2) filled with header names, this headers should be seperate coulms.
Article | value | Headername |
123456 | 125 | Sales Price |
123456 | 100 | Buying price |
123456 | 250 | Buying quantity |
Is should be something like this, then i can use the colums in my dashboard for the sum of Sales Price or Quantity.
Article | Sales Price | Buying price | Buying quantity |
123456 | 125 | 100 | 250 |
Does anyone have a good idea for this?
Regards Björn
Solved! Go to Solution.
Hello Pattem,
This works for 90%, now the grouping increase my dates till only one date, but I want to keep the dates so that I can see my what happens monthly. So that the values per month are in one row, like the table below.
Article | Sales Price | Buying price | Buying quantity | Date |
123456 | 125 | 100 | 250 | 1-1-2018 |
123456 | 50 | 25 | 10 | 2-1-2018 |
123456 | 200 | 100 | 25 | 3-1-2018 |
123456 | 125 | 100 | 250 | 4-1-2018 |
123456 | 125 | 100 | 250 | 5-1-2018 |
123456 | 125 | 100 | 250 | 6-1-2018 |
Regards Björn
Use the Pivot feature within Power Query
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Hi Livio,
That works fine, thank you.
Now the next question is, can I put the rows together with the same article number and same date, then I have one row with the colums filed with the values.
Now I have this
Article | Sales Price | Buying price | Buying quantity | Date |
123456 | 125 | null | null | 1-1-2018 |
123456 | null | 100 | null | 1-1-2018 |
123456 | null | null | 250 | 1-1-2018 |
and I would like to have this,
Article | Sales Price | Buying price | Buying quantity | Date |
123456 | 125 | 100 | 250 | 1-1-2018 |
regards Björn
Strange, using the sample data, I only get one row.
My formula bar for the pivoting step looks like this:
= Table.Pivot( PreviousStep , List.Distinct(PreviousStep[Headername]), "Headername", "value")
In case you have issues with duplicate values, you can click on Advanced Options and pick another aggregation function for the pivot operation (SUM, MIN, ...)
@bkoenen Please use "Group By" option in "Power Query Editor, with MAX on each field
Proud to be a PBI Community Champion
Hello Pattem,
This works for 90%, now the grouping increase my dates till only one date, but I want to keep the dates so that I can see my what happens monthly. So that the values per month are in one row, like the table below.
Article | Sales Price | Buying price | Buying quantity | Date |
123456 | 125 | 100 | 250 | 1-1-2018 |
123456 | 50 | 25 | 10 | 2-1-2018 |
123456 | 200 | 100 | 25 | 3-1-2018 |
123456 | 125 | 100 | 250 | 4-1-2018 |
123456 | 125 | 100 | 250 | 5-1-2018 |
123456 | 125 | 100 | 250 | 6-1-2018 |
Regards Björn
Hi Björn,
the pivoting step should be enough to get the desired result.
An additional grouping operation is not required.
Can you please provide a link ot a sample file, so we can look into it?
Regards
Hi Laurent,
The solutions from Pattern work for me, thank you for your response.
regards Björn
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
118 | |
101 | |
71 | |
61 |