Video není dostupné.
Omlouváme se.

Data Cleaning PRO Tip: Dealing with text & numbers in same column

Sdílet
Vložit
  • čas přidán 18. 08. 2024
  • Recently I had to deal with a weird data clean up scenario. My client (a large hotel chain) was getting room booking data with mixed format. The booking date column occasionally has a text value which needs to extracted and used for proper analysis. In this short tip video, let me show you how to deal with such problems using Excel.
    ⏱Video topics 👉
    ===============
    0:00 - The text & numbers problem
    0:39 - Avoiding the problem by removing text data
    2:32 - How to separate and properly arrange data (with Power Query)
    📗Sample file
    ============
    If you want to practice this concept, here is a sample workbook.
    chandoo.org/wp...
    👩‍💻👨‍🎓 LEARN MORE about Data Cleaning
    =================================
    📺 CZcams VIDEOS:
    on Power Query (complete tutorial, 80 mins, 260k views) - • Power Query Tutorial -...
    on Data cleaning (top 10 tips, 15 mins, 300k views) - • Data cleaning in Excel...
    More data cleaning (10 more tips, 15 mins, 50k views) - • Data Cleaning in Excel...
    👩‍💻 COURSES:
    💥Power Query mini-course (2 hours, full PQ with many practical examples) - chandoo.org/wp...
    📚FULL Excel (24+ hours, 100s of examples) - chandoo.org/wp...
    ~
    A data analyst walks in to the bar. A pretty lady smiles at him and walks over. She says, "You look cool. Here is my number. Text me your number."
    The data analyst replies, "Sorry, but I don't TEXT() numbers" 🤦‍♂️😂
    #datacleaning #excel

Komentáře • 122

  • @chandoo_
    @chandoo_  Před 2 lety +27

    Just checking... Do you want to see a Pandas tutorial on how to clean this data? Like the comment if you want to.

  • @Hopspowered
    @Hopspowered Před 8 měsíci +2

    Small token of appreciation. Several views lately and almost always save to my excel playlist. And you’re so entertaining as well. Even a rugby reference in a video!

    • @chandoo_
      @chandoo_  Před 8 měsíci

      Hey @Hopspowered... thanks for that lovely gesture and appreciation of my work. 😍

  • @vivekchakraborty6123
    @vivekchakraborty6123 Před 2 lety +4

    I never comment on any YT video, but your videos are really interesting and informative. Kudos to such content and Thanks for this

  • @muhammadjawad8422
    @muhammadjawad8422 Před rokem +1

    I am lucky to have a teacher like you. keep up the good work.

  • @tpnphoonsiri
    @tpnphoonsiri Před 10 měsíci

    Hi Chandoo,I love 2nd technique .This will my life easy than before.Thank you very much.

  • @canirmalchoudhary8173
    @canirmalchoudhary8173 Před 2 lety +7

    2nd solution is awesome, I was thinking how data can be retained while it is being removed 😀.

    • @chandoo_
      @chandoo_  Před 2 lety +1

      I am glad you liked to Nirmal :)

  • @khallodah1
    @khallodah1 Před 2 lety +1

    easy but yet very valuable. thannk you

  • @arun.kumar.s
    @arun.kumar.s Před 2 lety

    Learned power query from you and will keep learning from you. Boom

    • @chandoo_
      @chandoo_  Před 2 lety

      More power to you Arun ⚡

  • @MobinulHaq
    @MobinulHaq Před 2 lety

    THANK YOU!! So many accounting softwares extract ledgers like this (with account heads between dates) and it has been so frustrating until now. This is REALLY helpful!

  • @Azhar_Khan383
    @Azhar_Khan383 Před 2 lety +1

    I was familiar with the first technique but today I learned the second technique. I'm becoming awesome. Thanks Sir

  • @Luciano_mp
    @Luciano_mp Před rokem

    Great!!! Thank you Chandoo!

  • @binishthomas2675
    @binishthomas2675 Před rokem

    I might have not done this using power query [might have used fiters and delete]......a really nice application. 👍

  • @warriorppr
    @warriorppr Před rokem

    Hi Chandoo, Thanks a lot. i was looking for this solution and found this video by God's grace. Excellent, Appreciate it Bro.

  • @theanalystkr3255
    @theanalystkr3255 Před 2 lety

    Just started my journey into data analytics, thanks for these really interesting/intuitive videos!!

  • @chrism9037
    @chrism9037 Před 2 lety +1

    Great video as always! Thanks Chandoo!

    • @chandoo_
      @chandoo_  Před 2 lety

      Glad you enjoyed it Chris.

  • @namy1557
    @namy1557 Před 2 lety +1

    good tips on data cleaning, Can't wait to apply this knowledge practically.. 👌🏻

  • @nethikarnarendra4884
    @nethikarnarendra4884 Před rokem

    Amazing solution!! How to text.combine for only single column e.g. QnA in multiple rows separated by ? Delimiter (Q ends with?)

  • @savissm
    @savissm Před 2 lety

    Thank you Chandoo 🙏

  • @surajchavan6447
    @surajchavan6447 Před 2 lety

    As always awesome!!

  • @muraliiyer7850
    @muraliiyer7850 Před 2 lety +1

    Nice to learn 🙏

  • @Seftehandle
    @Seftehandle Před 2 lety

    Great approach for people trying to transition to power query and later on dax. I loved how you gave the1st option for excel beginners as well as 2nd one for intermediate learners. Cant wait to see how will you transition to simple dax!!!!!

    • @chandoo_
      @chandoo_  Před 2 lety +1

      You are welcome Tina. The rule when it comes to DAX is simple. Try to solve data problems first with SQL / Power Query or other source systems. If you try to develop DAX solution for this problem, you will do a lot of unnecessary stuff.

    • @Seftehandle
      @Seftehandle Před 2 lety

      @@chandoo_ thank you Chandoo!!! I agree regarding power query - dont know how to start w swl really. For dax - maybe you could create sime simple intro to creating formula and writing code here - if you see the need. Not necessarily for this case but maybe other use cases.

  • @talknow2859
    @talknow2859 Před 4 měsíci

    Amazing stuff 🎉!

  • @WiFiJeremy
    @WiFiJeremy Před 2 lety

    Great stuff, Chandoo!

    • @chandoo_
      @chandoo_  Před 2 lety

      You are welcome Jeremy :)

  • @bimantoro17
    @bimantoro17 Před 2 lety

    Ty chandoo, love u

  • @ExcelWithChris
    @ExcelWithChris Před 2 lety

    Nice one. Thanks!!

  • @Excelambda
    @Excelambda Před 2 lety +1

    Great video!!✌
    To solve with a formula:
    =LET(ar,A2:D196,h,A1:D1,d,A2:A196,f,D2:D196,
    a,IF(ar="","",ar),s,SEQUENCE(ROWS(a)),
    x,f="",
    k,XLOOKUP(s,FILTER(s,x),FILTER(d,x),,1),
    VSTACK(h,FILTER(HSTACK(a,k),NOT(x))))
    And dates are dates (numeric), and room numbers , numbers, so we can do other filtering etc

    • @Excelambda
      @Excelambda Před 2 lety

      Forgot to name the last column:
      =LET(ar,A2:D196,h,A1:D1,d,A2:A196,f,D2:D196,t,"Text Value",
      a,IF(ar="","",ar),s,SEQUENCE(ROWS(a)),
      x,f="",
      k,XLOOKUP(s,FILTER(s,x),FILTER(d,x),,1),
      IFNA(VSTACK(h,FILTER(HSTACK(a,k),NOT(x))),t))

    • @chandoo_
      @chandoo_  Před 2 lety

      Good one... 😎

  • @nothinghere4520
    @nothinghere4520 Před 2 lety

    Love this!!

  • @sunilkumar-jl7uf
    @sunilkumar-jl7uf Před 2 lety

    एक्सीलेंट tricks 👍👍

  • @Riri-qi2fu
    @Riri-qi2fu Před 2 lety

    Omg thank u! This is so useful!

    • @chandoo_
      @chandoo_  Před 2 lety +1

      Glad it was helpful!

    • @Riri-qi2fu
      @Riri-qi2fu Před 2 lety

      @@chandoo_ - I use various computing codes prepare reports but nothing can compete with excel when it comes to user friendly funtions! Excel team has done a great work in last 2-3 years!

    • @chandoo_
      @chandoo_  Před 2 lety

      YES!!!

  • @vishalbhati912
    @vishalbhati912 Před 2 lety +1

    Sir u don't need go to special. Just simply apply filter and choose blanks and press ctrl+ - boom.

  • @elfridhasman4181
    @elfridhasman4181 Před 2 lety

    Wow, Your video help me a lot :)

  • @carpediemwithLesli
    @carpediemwithLesli Před 2 lety +2

    This is great!!
    I'm also looking for a formula for the following:
    This is my issue: I need to keep my employees at 40 hours a week. So if on Thursday I do the time cards and let's say Monday thru Wednesday they are at 30 hours already. Assuming that on Thursday they will do 8 hours and they will only have 2 hours left for Friday; at what time on Friday they will go home when they get to 40 hours?
    So the formula that I need is:
    Accumulated hours ➕️ today's 8 hours; hours left for Friday equals at what time he will go home on friday..
    Help!

    • @chandoo_
      @chandoo_  Před 2 lety +2

      You are welcome CDWU.
      You can use a formula like this to see how many hours they will have for Friday.
      =MIN(8, MAX(32-hourssofar, 0))
      You can then add that to starting time to see what time the employee can leave on Friday.

  • @basicinfoforall7306
    @basicinfoforall7306 Před 2 lety

    your content is good always.thanks

  • @amc1520
    @amc1520 Před 2 lety

    Genuis! 👏

  • @Sekoleyte
    @Sekoleyte Před 2 lety +1

    Hi. Chando. Let's do your 2nd technique with an another simply solution.
    Firstly please add a column at the beginning of the page. you will scroll your columns. i mean your A column will be your B column. i don't know but CTRL+R didn't work while our single values in column A. i can reference cells better with this :)
    1) filter blank cells from C,D or E columns.
    2) choose your values from B column, and choose cells from F column in the same range.
    3) Then press CTRL + R.
    4)Then remove the filter. and refilter your values instead of blank cells from column C, D or E.
    5) write "=F3", in cell F2 and scroll it down.
    And ta taaa :)

  • @deshn21
    @deshn21 Před 7 měsíci

    Superb. Learned something new!

  • @arbazahmad7177
    @arbazahmad7177 Před 2 lety

    Awesome 👌

  • @naiduvikas202
    @naiduvikas202 Před 2 lety +1

    Crazy tip

  • @taizoondean689
    @taizoondean689 Před 2 lety

    Thank you 🙏

  • @miguelgomez9078
    @miguelgomez9078 Před 2 lety +2

    Hey Chandoo,
    Thank you for the great work you do and for your videos that are beyond helpful. I have a problem that maybe you can solve. If I wanted to sort quarterly dates in the format of 1Q22 (quarter, quarter letter indicator, year) from earliest to latest, how would you go about it?

    • @chandoo_
      @chandoo_  Před 2 lety +1

      You are welcome Miguel. If you just have text values of 1Q22, 2Q22, 1Q21, 3Q20, etc. in a column, you can use this formula (Excel 365).
      =SORTBY(data, RIGHT(data,2)+0, LEFT(data,1)+0)
      But a better option would be to extract the Q & Year and then use Sort options and set up two level sorting if it is a one off thing.

  • @leehueyyun630
    @leehueyyun630 Před 2 lety

    It is awesome.

  • @chandrasekarsankar102
    @chandrasekarsankar102 Před 2 lety

    Great!

  • @benndii
    @benndii Před 2 lety +1

    Danke!

  • @bc4198
    @bc4198 Před 2 lety

    Thanks, Chandoo! Question: HowWouldYouAddSpacesAtCapitalLetters?

    • @chandoo_
      @chandoo_  Před 2 lety

      In Power Query, you can split text when the case changes. You can then "merge" these columns with space as delimiter.

    • @Excelambda
      @Excelambda Před 2 lety +1

      A formula, that works for any array/range:
      =REDUCE(range,CHAR(SEQUENCE(26,,65)),LAMBDA(v,x,TRIM(SUBSTITUTE(v,x," "&x))))

    • @chandoo_
      @chandoo_  Před 2 lety +1

      Good one. Donut for you 🍩
      One more I come up with...
      =TRIM(REDUCE("", MID(B2,SEQUENCE(LEN(B2)),1),LAMBDA(a,v,a&IF(EXACT(v,UPPER(v))," "&v,v))))

    • @Excelambda
      @Excelambda Před 2 lety

      @@chandoo_ Super cool!! But what is "range" ??
      If in B2 we set the "sentence" we want to "split" then range should be an empty string "" like in:
      =TRIM(REDUCE("", MID(B2,SEQUENCE(LEN(B2)),1),LAMBDA(a,v,a&IF(EXACT(v,UPPER(v))," "&v,v))))
      This works fine for a single cell.
      My "range" can be column/row vectors or 2D arrays 😉
      Your idea with EXACT is to be used if we have unusual capital letters like Ñ or others that are not found in an usual alfabet. So, embracing your idea with EXACT, a bullet proof formula that will work with any chars and also handling 2D arrays can be:
      =MAP(range,LAMBDA(x,LET(m,MID(x,SEQUENCE(LEN(x)),1),TRIM(TEXTJOIN("",,IF(EXACT(m,UPPER(m))," "&m,m))))))
      For a single cell, everything that is after LAMBDA can work as a formula, no REDUCE needed
      =LET(x,B2,m,MID(x,SEQUENCE(LEN(x)),1),TRIM(TEXTJOIN("",,IF(EXACT(m,UPPER(m))," "&m,m))))
      So , team work won. Half of donut to you. ✌😉

    • @chandoo_
      @chandoo_  Před 2 lety +1

      My bad. Should have been REDUCE("" instead of REDUCE(range...
      and yeah, I never eat half a donut. 😂

  • @saimourya579
    @saimourya579 Před 2 lety

    I am French teacher , how I use French mix up with Ms Excel to get freelancing job
    will you please give a suggestion for me

  • @peace_321
    @peace_321 Před rokem

    What if there are dates (text datatype), instead of some words in the date column .. and there might not be any blank cells..
    How to solve this .. ????
    Is it must to use SQL for this or can we do it by using EXCEL OR POWER BI

  • @yuvrajyewale4980
    @yuvrajyewale4980 Před 2 lety

    Very valuable content on your you tube.
    I have an data of 1000 rows and 500 column and want to modify the data of random 200 rows ..i am filtering 200 rows using normal filter manually...is there any alternative to select 200 rows quickly ?

  • @sakeobulesu7130
    @sakeobulesu7130 Před rokem

    Awesome

  • @stephaniemorris9143
    @stephaniemorris9143 Před 6 měsíci

    Chandoo, in your conditional column, what does it mean when you select Output of Date? I am confused by this since date isn't the actual output in the conditional column. I hope you see this and respond...many thanks!

    • @chandoo_
      @chandoo_  Před 6 měsíci

      Thanks for your question. The "Date" is just a placeholder for us to know which rows have dates and which ones don't.

  • @TheBossSuperstar
    @TheBossSuperstar Před 2 lety

    How fill up works. Will it reads the unique value as null and fills up. Can it be blank instead of null and will it works still.

    • @chandoo_
      @chandoo_  Před 2 lety

      I haven't tried it with blanks. But as far as I know, I think it just reads nulls and replaces them with the value from below. Kind of like bfill and ffill in Python Pandas.

  • @Munichandra_Reddy
    @Munichandra_Reddy Před 2 lety +1

    Hi Chandoo,
    I want to Your help, in my current role, I am facing lack of store produce issue, please tell me, where will I learn more Advanced Store produce ? Swift response

    • @chandoo_
      @chandoo_  Před 2 lety

      Not sure what you mean by "store produce". If you meant stored procedures, I am not the person to help. I don't use them.

  • @ManoharVideos.
    @ManoharVideos. Před rokem

    Super

  • @RamKumar-ye3gg
    @RamKumar-ye3gg Před 2 lety

    Hi Chandoo !!
    I need help in creating a macro which can combine data from different tabs in one. However the header keep changing for files.
    Sometime it will have header in 2 rows sometime in 3.
    I want to write a macro which will check how many rows are header and from next row it will copy the data and paste in the main sheet with same header format.
    Please help.

  • @emtyas
    @emtyas Před 2 lety

    Hey Chandoo,
    Hope you're doing well...
    I have around 1K of Google Maps hyperlinks in my excel file from which I must extract the latitude and longitude of each. Considering that there are thousands, it can be quite challenging to do it manually...
    In any future video or in the comments, if you would be so kind as to share any formulas or tricks, that would be great.
    Thanks...

    • @chandoo_
      @chandoo_  Před 2 lety +1

      You can use the TEXTSPLIT() function (new in Excel 365) for these kinds of tasks or Power Query. I suggest learning a bit more about PQ using this video - czcams.com/video/PiFAa_jjaEI/video.html

  • @omkarhulsurkar7518
    @omkarhulsurkar7518 Před 2 lety

    Hello Chandoo. I follow your YT videos these are very informative. I have a unique problem in power bi. In which I want to calculate date from a date column by user input parameter. But that column doesn't get updated when I change user input parameter. Can you tell me how I can resolve this.

    • @chandoo_
      @chandoo_  Před 2 lety

      Hi Omkar.. the column calculations don't update in runtime. They are calculated and set in model at the time of creation.

  • @amitverma1778
    @amitverma1778 Před 2 lety

    Hi Chandoo , seen your so many videos and it's very inspiring and informative for new commers .... It will be helpful if you could help me out with one problem or any experts viewers most welcome. I'm facing the weird issue , a client sent me file which has a its own theme but when I try to open same in my pc themes is getting changed to default automatically.
    Any suggestions how to stop default theme and keep the theme to client one🙇🙏

    • @chandoo_
      @chandoo_  Před 2 lety +1

      You are welcome Amit. I have never noticed this kind of issue. I suggest posting about it on a forum like the official Microsoft help site or stackoverflow.

    • @amitverma1778
      @amitverma1778 Před 2 lety

      @@chandoo_ Thank you very much for reply ❤️😊

  • @aravindr8034
    @aravindr8034 Před 2 lety

    But company row are still get some blank value

    • @chandoo_
      @chandoo_  Před 2 lety +1

      That is expected as not all hotel bookings will be for companies.

    • @aravindr8034
      @aravindr8034 Před 2 lety

      @@chandoo_ can you offer any assignments because my passion to become a data analyst and now I am work on it but I don't no how to implement all that I have learned so please help me to give any assignments like that chandoo bro

  • @rezabaig
    @rezabaig Před rokem

    Can you help me with cleaning data. Where can I ping you???

    • @chandoo_
      @chandoo_  Před rokem

      I am not available for any 1:1 help Reza. Please post your questions in a forum.

  • @artadme7448
    @artadme7448 Před 2 lety

    Hello chandooo

  • @EDM179
    @EDM179 Před rokem

    🤯

  • @SRCOMPUTEREDUCATION
    @SRCOMPUTEREDUCATION Před 2 lety

    You are awesome in excel , but your courses are too costly :D :D

    • @chandoo_
      @chandoo_  Před 2 lety

      Thanks SR. That is ok. My courses are not for everyone. I believe knowledge should be free. But my bank says free videos are not an acceptable form of payment for mortgage. So I charge for some of my content.

    • @SRCOMPUTEREDUCATION
      @SRCOMPUTEREDUCATION Před 2 lety

      @@chandoo_ yes you should charge for your expertise

  • @frankbradford9616
    @frankbradford9616 Před 2 lety

    I can’t believe he used personally identifiable data here. These are real people with real hotel stay dates. This has to be a violation of privacy or law. You should take this video (which is an excellent video btw) down and change the names in the data and reupload a new video

    • @Excelambda
      @Excelambda Před 2 lety

      He is a professional, definitely he used fake data. There are a lot of random list generators engines online for names and almost any type of data. Hint: When names and surnames of same person look like they are from distinct cultures roots it is obvious that are random generated names.

    • @chandoo_
      @chandoo_  Před 2 lety

      Thanks for your concern. This data is randomly made up. Why would you think these are real people.

  • @sirisoj
    @sirisoj Před 2 lety

    Chandoo please don't ruin your videos with memes 😥

    • @chandoo_
      @chandoo_  Před 2 lety +1

      Hmm.. what is so ruinous about a joke or two? This is how most of my videos (and even articles) have been.