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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Extracting data from same Excel template files

Hi everyone,

 

I am struggling with this for past day and can't figure out a way to figure it.

 

Since the data I work with is rather confidental, I try to explain it through the image below.

training-matrix-700.png

 

 

What I have is something similar. Now, I would like to import all files from the folder with the same template (approx 200) and all the others that are going to be additionally added, into my Power BI project.

 

First green rectangle shows the order number, area and author.

Next to it (not indicated on the picture), between first and second rectangle is Order in and Order out dates (Columns 7 and 😎 which I would like to simply move to the Column 1 and overwrite the existing data that is now there and I don't need it.

Second, lower, rectangle is showing different values with true and false. (Column 1 are the titles, and the values in TRUE/FALSE are part of Column 2)

Finally, there is one more piece of data whose title is ''Total hours'' and is also in Column 1 but it's numerical value is located in Column 7.

 

Rather complicated explanation but I am not sure how to do it better. Any inputs are appreciated since I would be easily able to figure out a way around if there was some video or article on this topic. I usually work with flat excel tables or source my data from DB.

 

I am thankful for any advices.

 

Best,

Filip

1 ACCEPTED SOLUTION

@Anonymous  then what you should do is get data from a folder and not an individual file in your getdata method, apply all those steps once you have done a combine (as long as they all the same, it will copy the first file format)

 

that way you can apply it to multiple files  or if you dont want to combine them, then i suggest creating a source parameter that you can create on one and copy and paste in all, or a function

 

combine :  https://www.youtube.com/watch?v=RAmSdxt863s

functions/parameters:  https://www.youtube.com/watch?v=GgwXt4LVmsU

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
vanessafvg
Super User
Super User

@Anonymous   its a bit difficult to help without access to date, however this video is quite useful in understanding how to move complex excel data into a userable format, at least here you will learn some strategies

 

https://www.youtube.com/watch?v=ECT5WR0D6-w&t=1429s





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

Dear @vanessafvg,

 

Many thanks for your quick reply. The video shows me something which I already did and is only on an example of one file that needs adjustment.

 

I would like to highlight something that I obviously did not in my original post and that is that I managed to clean one file through Query editor in Power BI exactly as I want it. As well, I was able to Pivot it and changed it from the bottom-up and transferred these items as my column names.


However, I still have 188 files left with this type of sheet. However, each file has 6 sheets so I would have to do same steps as I did for the one I have now for the rest and that makes it hours or even days of work. I think it took me around 15-20 steps in Query editor to clean my data on the sheet I use only on one file...

@Anonymous  then what you should do is get data from a folder and not an individual file in your getdata method, apply all those steps once you have done a combine (as long as they all the same, it will copy the first file format)

 

that way you can apply it to multiple files  or if you dont want to combine them, then i suggest creating a source parameter that you can create on one and copy and paste in all, or a function

 

combine :  https://www.youtube.com/watch?v=RAmSdxt863s

functions/parameters:  https://www.youtube.com/watch?v=GgwXt4LVmsU

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

Hi @vanessafvg ,

 

I did work the way out with the video provided (functions/parameters), it was tough but I managed it. However, I now have a tough times figuring out how to use Replace value on a row of a column that contains a date. Is there any generic way to say row 5, column 8 value to be replaced into row 5, column 2? In excel this is very straight-forward, but in Power BI not so.

 

Thanks for your time and help!

@Anonymous  you probably wouldn't do it the same way, can you filter the value you looking for?   ie if column x = a then colum b sort of thing?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

Dear @vanessafvg,

 

Thank you for your assistance. The function/parameters video got me close, I did had a feeling it is on the good way to solve but in the end, did not work. That was the way I thought it would be possible to solve it but did not work.

 

I will dig deeper into it and in case I find a feasible solution, share it here.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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