Тёмный

Power BI Tutorial | From Flat File To Data Model 

Подписаться
Просмотров 155 тыс.
% 3 750

In this Power BI Tutorial, Patrick looks at how to load data from a flat file to the data model. This could be a text, csv or excel file with a lot of columns. Don't just pull it into Power BI. Take time to structure your data in your data model. From flat file to data model is basic concept, but is worth the time to get it right!
LET'S CONNECT!
Guy in a Cube
-- guyinacube.com
-- guyinacube
-- guyinacube
-- Snapchat - guyinacube
-- guyinacube
***Gear***
Check out my Tools page - guyinacube.com/tools/ #powerbi #guyinacube

Наука

Опубликовано:

 

13 июн 2018

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 171   
@Matt-qx3ne
@Matt-qx3ne 3 года назад
Patrick, this is such an important video. WAAAAYYY too many analysts at my company use the "flat file" method. When I was a newbie, that's what I was taught, so I never questioned it, despite the process being slow and inefficient. I remember people using VLOOKUPS in excel, of all things, to mash together enormous tables and them load them up into Tableau (lol). The idea was literally "if Excel crashes, just try again". So much wasted time. So many fire drills when handling urgent requests. Then one day, a colleague of mine told me about power query and PBI, and it felt like my eyes were opened for the first time. This type of stuff may be second nature to a DBA, programmer, etc... but a lot of us in finance, accounting, sales ops, etc. don't have any experience with creating data models, writing DAX or SQL, etc. We end up taking the long, arduous path to get to our destination, because it's the only path we know. Little do we know that we have a freaking jetpack that we can use to get us there in no time at all. Great video.
@philiphibberd9490
@philiphibberd9490 Год назад
This is absolutely true - giving people no/low code tools doesn't make them programmers.
@Jonathan-gd3rp
@Jonathan-gd3rp 5 лет назад
Thanks Patrick, your relaxed humor sets you apart from others and makes it easy to watch you videos.
@GuyInACube
@GuyInACube 5 лет назад
Much appreciated Jonathan! Thanks for watching 👊
@peterhofmann8292
@peterhofmann8292 6 лет назад
Patrick, sometimes going back to basics is just great. Thanks for putting this together!
@GuyInACube
@GuyInACube 6 лет назад
I agree. We are doing to be doing more videos like this.
@shujashakir9952
@shujashakir9952 Год назад
Hi Pat, I have been following this technique in modeling my data for long, applying it to some of the most complex datasets, and it has never let me down in terms of analysis. It might sound basic, but it isn't. Once you master it, any analysis, no matter how intricate it is, becomes a piece of cake. Thanks for revisting it.
@MrBaritonefreak
@MrBaritonefreak 3 года назад
Dude, THANK YOU! This is one of the best tutorials for real world power BI usage. So many tutorials don't include these basic steps, or simply brush over them. You're kind, explain everything in detail, and best of all it friggin works like a charm. I can't thank you enough for relieving my frustrations. You're the best
@mauriceprice4211
@mauriceprice4211 2 года назад
Hi Patrick, Love this. I'm new to Power BI and one of the projects I'm going to be creating a report for only has flat data. So this is going to be a total life saver!! (You get two exclamation marks as one just doesn't do it) Maurice
@kyleparsons1735
@kyleparsons1735 4 года назад
Beautifully explained. Love the content!
@jackodum9643
@jackodum9643 6 лет назад
Patrick, you are always make me smile. Thanks!
@GuyInACube
@GuyInACube 6 лет назад
Woot! Mission accomplished! Thanks for watching Jack! 👊
@syrophenikan
@syrophenikan 4 года назад
CALENDARAUTO... why have you been hiding from me for 2 years? I think I often learn more from the lesser-focused topics than the main topics (sometimes). Thank you immensely!!!!!!!
@jan_aroundtheworld
@jan_aroundtheworld 4 года назад
this is so much better than the rest of power bi tutorials, great job!
@user-xp7so8lu5w
@user-xp7so8lu5w 11 месяцев назад
So much easier to learn and follow - your teachings skills are brilliant - fell asleep on so many other videos
@ibrahimalshweair7866
@ibrahimalshweair7866 4 года назад
Get intimate with it Pat! 😂 man you’re great.
@CS-qw9tb
@CS-qw9tb 4 года назад
Thank you for this and all of your insightful videos - I'm learning so much!!! One huge request I have is, can you add videos with qualitative social science survey examples? A big problem with learning PowerBi is 1. newbies don't know the PowerBi terminology to know what we need to learn, and 2. All of the examples across all the PowerBi samples I've seen tend to focus on product, sales, revenue, etc. types of data. It would be great to see a qualitative-focused social science survey with 50-100 questions, including lots of skip values and various section topics in the survey, with data showing the same survey's results for different language-speaking populations in one country, and then for different language-speaking populations in another country, and then show modeling builds and reports of that data by respondent profile (country, spoken language, sex, age), survey section, question groupings within or across sections, and skip logic. Please can you guys tackle this for us social scientists? THANK YOU!
@carlycontri1778
@carlycontri1778 Год назад
Heck yes! 100% agree with this comment. This is part of why it seems so challenging to learn power bi because so many examples are related to sales, or data sets that have a ton of quantitative data to start. I am trying to pull in multiple data sets of survey Data from surveymonkey for example, have absolutely no idea how to merge the data together because it’s all unique fact tables. Sometimes it seems the only common denominator is date, otherwise how else can these datasets be combined Or tables liked by relationship? The surveys can all be from one overall program and it’s important to show them all to understand the big picture. Even in trying to merge all fact tables into one, the surveys and questions can all be very different. These are often random participants without any identifiers either. This is super hard. Very thankful for your videos, they do provide a lot of ideas and such. It’s still challenging going back and trying to apply these skills for the data evaluators or qualitative analysts.
@ronny1392
@ronny1392 2 месяца назад
Loved your explanation ! easy to grasp and right to the point!!
@fiqhonomics
@fiqhonomics 3 года назад
On a date with my flat file. Very useful and entertaining, thank you! So basically, the flat file was separated into one fact table and two (three) dimension tables with linkages.
@mwaltercpa
@mwaltercpa 4 года назад
This just popped up in my feed two years later, but still a great tip for getting started in modeling.
@GuyInACube
@GuyInACube 4 года назад
haha love it! 👊
@crossbow1627
@crossbow1627 2 года назад
I need the basics - I'm just starting out - Thanks for going back to the basics
@michelmitri2686
@michelmitri2686 5 лет назад
i love your tutorials man. you are amazing.. respect
@shamf6624
@shamf6624 3 года назад
Thankyou for making it look so simple
@user-dv6gf7xp8v
@user-dv6gf7xp8v Год назад
Exactly what I needed, thank you.
@cm_dev
@cm_dev Год назад
These videos never miss!
@hugyourdata1549
@hugyourdata1549 Год назад
First Time and I am loving it!!! Thanks!
@rushmuzik
@rushmuzik 2 года назад
This is the gold nugget. GOLD!!!!!
@lydriarivera1692
@lydriarivera1692 4 года назад
Patrick Great Post so clean the file and creation the table that will be used. Just have issue trying to set them up
@MatBat__
@MatBat__ 2 года назад
Bro you are out of this world good. Literally my whole team is watching your videos now Cheers from BR
@HananAmos
@HananAmos 4 года назад
Perfect 👌 It's always important to go back to basics 👏
@GuyInACube
@GuyInACube 4 года назад
agreed! 👊
@nevillewhite2458
@nevillewhite2458 3 года назад
Cool stuff! I used to deduplicate dimension tables in this way, by selecting all columns and then using remove duplicates. That has the risk that if the csv file is made up from different sources, the key might be duplicated with different definitions. My new approach is to sort the dimension table by modified date descending (if there is such a column) and then use remove duplicates only for the primary key column. If there are duplicate keys then this approach appears to retain the most recent definition due to the sort by date.
@mattniccolls7833
@mattniccolls7833 Год назад
Great set of videos Patrick!
@SolutionsAbroad
@SolutionsAbroad 4 года назад
Great video as always Patrick, good run through on the basics of creating a data model from scratch
@rayng4336
@rayng4336 3 года назад
Back to basics is always good.
@mehdihammadi6145
@mehdihammadi6145 6 лет назад
Interesting, Thank you for sharing Patrick
@GuyInACube
@GuyInACube 6 лет назад
Most welcome. Thanks for watching Mehdi!
@migmanc
@migmanc 6 лет назад
Another good video, thanks Patrick
@gambu4810
@gambu4810 2 года назад
Dude you're brilliant
@gydabjorg
@gydabjorg 4 года назад
So useful. Thanks 🙌
@iamtrapped1
@iamtrapped1 2 года назад
Great tutorial - it's really helped me out. Also Texas represent!
@Phoenixspin
@Phoenixspin 4 года назад
I wish I knew this stuff well enough so I could be an honorary guy in a cube. However, with each video I am learning more and more and getting closer to this goal.
@ohscarivera
@ohscarivera 4 года назад
Thanks Pat. I just subscribed today.
@jaliali84
@jaliali84 3 года назад
Love it and great explanation 😍
@abigi4me
@abigi4me 4 года назад
Great video thanks for doing this
@MrWrklez
@MrWrklez 2 года назад
Great video!
@timmontagjr.3171
@timmontagjr.3171 3 года назад
“Out in the wild” 😂😂😂 I love it!
@malcorub
@malcorub 3 года назад
Patrick's a wild man!
@manoottranslate8511
@manoottranslate8511 3 года назад
Thanks. This helps a lot 👍🏼
@Easy2Enjoy
@Easy2Enjoy 10 месяцев назад
So excited about bi
@heraldfinch7010
@heraldfinch7010 5 лет назад
Great work Patrick
@GuyInACube
@GuyInACube 5 лет назад
Appreciate that! Thanks for watching! 👊
@kristinamelnichenko5775
@kristinamelnichenko5775 3 года назад
Great stuff!
@hoof-hearted-2024
@hoof-hearted-2024 3 года назад
Excellent!
@FB045
@FB045 4 года назад
Amazing content!
@dmytroskrypka
@dmytroskrypka 4 года назад
Great video. Although I'm a bit stumbled on what to do if I don't have keys in the original file. Is there a way to add them?
@tubeitz
@tubeitz 4 года назад
thanks Patrick- another great video :)
@GuyInACube
@GuyInACube 4 года назад
Thanks! 👊
@prateekraina2781
@prateekraina2781 6 лет назад
You can also remove duplicates by clicking on the option in top left corner icon of the table in query editor. Saves time ;)
@GuyInACube
@GuyInACube 6 лет назад
Yup! So many different ways to do stuff. Thanks for calling that out!
@RevengerMon
@RevengerMon 6 лет назад
Thanks for sharing.
@GuyInACube
@GuyInACube 5 лет назад
Thanks for watching!
@samarendrapanda4626
@samarendrapanda4626 5 лет назад
I was wondering if I don't have the Productkey or Orderkey in the main datasheet. How we can make the relationship with the fact table after creating the different Product and Orders table.
@mahesh84
@mahesh84 4 года назад
thank you for wonderful video
@GuyInACube
@GuyInACube 4 года назад
Most welcome! Thanks for watching. 👊
@WolFX_FPS
@WolFX_FPS 2 года назад
Hey! Loved this video, do you have a data transformation video on excel speadsheets in a given scenario where a business might be still using excel as their database, you know, the common top 4 rows is a header, they use columns for Quarters and use aa single column as a category for different targets and a single column for target value? Keen to know if you have video to manage transformation to designa report out of this manual data entered spreadsheet.
@nageswar7777
@nageswar7777 2 года назад
Thanks for the explanation, few doubts I have 1. If the data doest have keys or codes how do you add. 2. If the file is dynamic how the above model works when there are new columns in next updated .csv file
@TheAusafonly
@TheAusafonly 4 года назад
Hey i really liked your videos wonder if you can create a video on azure cost management usage details.
@tarafekrat1782
@tarafekrat1782 2 года назад
Thank you Patrick. I am Power bi newbie and wondering if you have videos on org change impacts reporting in PowerBi?
@mansoorshaik7263
@mansoorshaik7263 6 лет назад
Hey Patrick !! BTW its nice VDO .. But if the flat file data is fully transactional where we store only keys for the respective dimensions then I don't think so we can create a model having Dimension tables (Key,Value pair) .. Any idea how to achieve this ? Thanks
@SirTupsAlot
@SirTupsAlot 4 года назад
Patric! I did something similar recently but rather than duplicating the data set multiple times (which results in multiple queries, I did some basic cleanup and then created a bunch of reference queries for modeling. Is there a reason you duplicated rather than referenced ?
@fabiovanroon1524
@fabiovanroon1524 2 года назад
Awesome tip to duplicate to create other supporting tables...easier to get to STAR model!
@leandrooliveira-adasa7274
@leandrooliveira-adasa7274 3 года назад
Patrick, great job! Awesome. What happens if I need to update the datas after aplying all these changes using the original file? Is it possible? Is it going to give a error message? Thank you. Is Power BI able to identify the changes?
@muhdkhairulhassan7736
@muhdkhairulhassan7736 3 года назад
great example. could you also provide the data you are working with?
@DIGITAL_COOKING
@DIGITAL_COOKING 5 лет назад
because power query is key sensitive I think you should add an upper or lower case for product names; in case you add new data ( preventing relationship)
@GuyInACube
@GuyInACube 5 лет назад
Great call out! Thanks for mentioning that!
@azain3564
@azain3564 5 лет назад
Great video Patrick! Where does one get those cool looking PBI Shades? ;)
@jourdango2615
@jourdango2615 4 года назад
Hello, Thank you for a wonderful tutorial. I wanted to get more specific though in terms of what the benefits are of transforming a flat file into a star schema. Is it simply organizational in nature? Does it make the file size smaller? Do filters run more efficiently? What are the specific sort of benefits from transforming a flat file into a star schema? Thanks
@TinyKideo
@TinyKideo 2 года назад
Not sure if you have received the answer, but the whole process is called Normalization it helps your Data Model to be more efficient, save memory by removing redundant, and even great structure for your data!
@fredsalfa
@fredsalfa 4 года назад
Thanks
@ladduMalik
@ladduMalik 4 года назад
O boy you nailed it. Good job. May I know the name of Microphone you are using to record?
@J4RMAMS
@J4RMAMS 3 года назад
@Patrick, how do you create a unique product key or territory key for a flat file that does not come with one and you need to make one to create lookup (dimension tables)?
@chaseblue835
@chaseblue835 2 года назад
@Patrick, I'm wondering the same thing
@VinceM797
@VinceM797 3 года назад
Duplicate or reference? When you get a new file if you duplicate will it automatically update the 3 new tables in either option (example sales data in September then sales data in October)? Asking since you might have new products in October and new sales territories etc...Thanks! Videos are great!
@deesterdee6650
@deesterdee6650 4 года назад
So to link the pieces of data from one data table to the other, you just have to have at least one column in both with the same data to link the two together? I'm new to PowerBI and data table relationships :)
@michaels1813
@michaels1813 4 года назад
Great Video . Thanks. After you publish this on PowerBI.com how do you handle updates to the data? Also would this work well if the flag file is very large (many millions of rows). Thanks,
@yoshihirokawabataify
@yoshihirokawabataify 6 лет назад
Nice video, This is BI = Basic Intelligence for anyone.
@GuyInACube
@GuyInACube 6 лет назад
haha nice. There are folks just starting though and aren't aware of this.
@hk_200k
@hk_200k 7 месяцев назад
Q: Thanks Patrick. Fab. If IT send you 10 sales excel for 10 departments, different format, how do you decide if we clean them up and combine into one table, or just keep them separated?
@donacounts5357
@donacounts5357 5 лет назад
Great presentation my friend!
@kennethstephani692
@kennethstephani692 3 года назад
Golden!
@ajaaskelainen
@ajaaskelainen 6 лет назад
Great video! So, which table would you use for calculations and create new columns? I mean, the fact table? Do you even need it? Thx for your input!
@GuyInACube
@GuyInACube 6 лет назад
It depends on the calculation and the referenced columns.
@mariovasquez3108
@mariovasquez3108 5 лет назад
Great video! Once I upload the model to PowerBI Services, where should I add new records to the data set at that point? Only on the cloud data set? Do I even need the local spreadsheet any more at that point? Not the one Power BI desktop, but the first local copy I started with. Any feedback is appreciated. Thanks
@justinogarcia3705
@justinogarcia3705 5 лет назад
Good question would Microsoft forms work as a way to input data?
@eagillum
@eagillum 4 года назад
7:53- shift+enter to start a new line in the formula bar.
@sakaix7486
@sakaix7486 3 года назад
Thank you Patrick, this is awesome! I've been trying this yesterday with a Flatfile of 160MB and a second one with 50MB. When i either "Duplicate" or "relate" the Queries to the flatfile and build my dimensions, it seems that for "refreshing" its taking a loooong time, as it loads every flatfile as many times as i have created duplicates to build a dimension. Is there anything i can do about this? Am I going wrong at some place or is this normal behavior? Thank you :)
@roaming_bob8591
@roaming_bob8591 4 года назад
Patrick, looking for help. I need to add a new column and data in my data set in excel, that will be uploaded into an existing PBI model. What would be the best way to accomplish?
@bikertejas7987
@bikertejas7987 6 месяцев назад
Q hey Patrick is there any way to update the dimension table if new data is updated in the original flat/excel file.For eg we have 10 products in the original file but now new 2 rows products are added in original file
@jaitiwari241
@jaitiwari241 Год назад
Sir amazing video.. Please share dataset
@SHAli1474
@SHAli1474 3 года назад
Hi Patrick Does this methodology apply on Direct Query table instead of just flat CSVs? Working on an extremely complicated report, I've prepared a data table (flatten out/deformalized) in SQL Server by getting all the required columns for the report from different sources. I've ended up with some 180 columns and around 20 million rows. The PBI report will eventually be published to the Service (premium). What do you reckon, applying the cleanup method using different queries (as in this video), will help? Any insight is appreciated.
@veerud7479
@veerud7479 6 лет назад
Grate video
@GuyInACube
@GuyInACube 6 лет назад
Thank you so much!
@asimabdulwahab9444
@asimabdulwahab9444 5 лет назад
Nice
@cjimene5767
@cjimene5767 3 года назад
Hi! I know this is an old video but I am wondering... Is it better now doing all the data transformation using Data Flow instead of doing on PBI Desktop?
@jsoecarlosty
@jsoecarlosty 5 лет назад
Hi sir. It's a great video! Just have a question that was asked to me. If you already have all the info that you need in the flat file, why do you have to split them up in different tables?
@shandor2522
@shandor2522 3 года назад
JC: You’re on the right track, and if PowerBI were programmed with true productivity in mind it would automatically do much of this for the user. It could have prompts asking us to name the tables, and a better way to view & decide which columns to keep. Also the whole date table creation is absurd and should be automatic. Knowledge workers intuitively understand that what counts is exploring the data in visualizations like tables, plots, and maps-not creating tables which imply relationships we already know are there! Tableau just added this same “relationships” feature and is making many people mad, who had to use contorted table & “level of detail” calculations to aggregate data correctly-which new users won’t have to learn! All these data apps fall short of humanity’s common sense. We need app developers to offer truly no-code tools.
@shrikantlandage7305
@shrikantlandage7305 3 года назад
After building a Data Model from this flat file,What if on any other day v have data with same column name but different data...do v need to build Data Model again from Scratch or Power Bi fetch it...Pl Clarify me on it
@hrishiw1989
@hrishiw1989 2 года назад
I was doing this until, i wanted to create a time series data model with ability to filter data by date, week, hour. if we do this approach we can definitely do that however when you want to create hierarchy for for date till hour level it gets tricky
@xiaomozhu8398
@xiaomozhu8398 5 лет назад
Nice video, good example tells how to create your own data model step by step
@GuyInACube
@GuyInACube 5 лет назад
Thanks for watching Xiaomo!
@romanolever
@romanolever 6 лет назад
Hi Patrick, great tip! But I do it a little bit different ;) - Create a Sales_Raw query that is marked to not load - Reference the Sales_Raw for every other queries (ex: Product), remove the columns, remove duplicates Thanks
@GuyInACube
@GuyInACube 6 лет назад
Video with this approach coming soon! Thanks
@anselyoun7823
@anselyoun7823 2 года назад
@@GuyInACube Where is this video?
@TPM1878
@TPM1878 4 года назад
Do you keep keys as whole numbers or you change the data type to text?
@jaitiwari241
@jaitiwari241 Год назад
Hey Brother you make wonder videos on power bI and help millions of people out there .Its a Request please share the dataset to practice along, it would be great
@SD-jb1sp
@SD-jb1sp 4 года назад
I want to create dimension and fact table to have star model. . I have 2files. Both files have some common columns and similar data structure . Hence I am using Full Outer join , File one - 2085 recrods , file 2- 4981 records. What is the best join option i should be using ? Both files have some similar records. IS there a video/link which tells how to create dimension using merge? any help wll be highly appreciated
@sherryqueen31
@sherryqueen31 3 года назад
I haven't watched this particular video but I was looking to remove an excel source connection from the exisistng model, there wasn't any way to do that. Once you connect excel to a sql data model , there is no way out. You can remove it from the model per se , but the connection still exist which causes dataset refreshing issues in the server. I was connecting a report to this data source with sql and excel source in the server. the refresh failed , so I thought I will remove this connection but it will not let me. If you find a solution for that please let me know.
@lestatelvampir69
@lestatelvampir69 3 года назад
Love your videos! :) However, I'm facing a challenge as my source is not a flat file but a folder with several csv (one with 300k rows, the rest around 30k each and everyday there is a new file). My problems are basically two: 1) There are duplicates among the files which I need to clean, and 2) The file is really big. I'm starting to divide that master file into different dimensions and a fact table, but as I need to merge it first and get rid of the duplicates, it's also taking ages to update. Any tip? Regards from Barcelona, Spain! Victor.
@omkarsaste6998
@omkarsaste6998 Год назад
Can we create page number indexing in SSRS?
@AweshBhornya-ExcelforNewbies
@AweshBhornya-ExcelforNewbies 4 года назад
Hey Patrick its a great video. I didn't get the last part where you said separate the Data Model and Data Viz.
@GuyInACube
@GuyInACube 4 года назад
Appreciate that Awesh! What I mean by that is to reduce data silos and don't make copies of the data set. So that would mean publish your dataset (one Power BI Desktop file), and then create the report in a second Power BI Desktop file using a Live connection to the dataset). You can then reuse the dataset with multiple reports - even across workspaces.
@AweshBhornya-ExcelforNewbies
@AweshBhornya-ExcelforNewbies 4 года назад
Thanks Patrick got that
@hassalmua1691
@hassalmua1691 Год назад
Please provide a link to the csv file so we can follow your steps. Cheers!
@jameslaine2472
@jameslaine2472 4 года назад
After creating a date table, did you really need to manually set up a relationship between it and the other tables? I thought that's what "mark as date table" did automatically.