Search code examples
powerbipivotpowerquerypowerbi-desktopunpivot

Moving rows with the same values to new columns in Power BI


I assume it might be a silly question... I have some population data with values for particular categories in subsequent years, e.g. aged 0-4 overall, 0-4 men, 0-4 women. The table is as follows: Raw data

Now, I would like to achieve something like this: Target data

I was experimenting with pivots and unpivots without success...

Would be very glad for your help!


Solution

  • Bring the data into powerquery using data.. from table/range... Click select the Feature column. do Transform .. Pivot column.... choose value column as Values and in Advanced options choose Don't Aggregate. Then File .. close and load ... back into excel

    enter image description here