0

I have a data set that look like this

enter image description here

It shows the cost item within each division for each cost type and projects.

There are many divisions and lots of cost items within each division. Adding all divisions give you the total project cost for each project.

Problem!!!!

I want to show the break down of the division cost for each project. Sth you can expand and collapse for each project.

But I can't establish a hierarchy in power bi as there is no column that reflects the relationship between each divisions and its cost items.

So i tried to transpose/alter the data set so it looks like this

enter image description here

enter image description here

**How do i do this with python/vba?

I think multiple looping in vba can solve this problem. But are there any other approaches?

horseyride
  • 17,007
  • 2
  • 11
  • 22
  • you could bring the data into powerquery with data ... from table/range, click select first two columns, right click unpivot other columns, then file close and load it back to excel – horseyride Aug 29 '23 at 15:05

0 Answers0