<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Allan Miranda on Medium]]></title>
        <description><![CDATA[Stories by Allan Miranda on Medium]]></description>
        <link>https://medium.com/@data-cruncher?source=rss-8ee9b5876f89------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*u97w8n_ouJl0ivTZEr4czw.png</url>
            <title>Stories by Allan Miranda on Medium</title>
            <link>https://medium.com/@data-cruncher?source=rss-8ee9b5876f89------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 23:29:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@data-cruncher/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Unlocking VBA — Automate Business Tasks]]></title>
            <link>https://data-cruncher.medium.com/unlocking-vba-automate-business-tasks-1d3dfc030f61?source=rss-8ee9b5876f89------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d3dfc030f61</guid>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[vba]]></category>
            <dc:creator><![CDATA[Allan Miranda]]></dc:creator>
            <pubDate>Thu, 12 Jan 2023 02:23:36 GMT</pubDate>
            <atom:updated>2023-01-12T02:24:52.605Z</atom:updated>
            <content:encoded><![CDATA[<h3>VBA Automation for Business Efficiency</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d3dfc030f61" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PDF to Google Sheets (using Script Editor)]]></title>
            <link>https://data-cruncher.medium.com/pdf-to-google-sheets-using-script-editor-97bfc91fa225?source=rss-8ee9b5876f89------2</link>
            <guid isPermaLink="false">https://medium.com/p/97bfc91fa225</guid>
            <category><![CDATA[google-sheets-script]]></category>
            <category><![CDATA[pdf]]></category>
            <category><![CDATA[google-sheets]]></category>
            <dc:creator><![CDATA[Allan Miranda]]></dc:creator>
            <pubDate>Fri, 06 Jan 2023 10:35:39 GMT</pubDate>
            <atom:updated>2023-01-06T10:35:39.737Z</atom:updated>
            <content:encoded><![CDATA[<img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97bfc91fa225" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Warehouse Project — New Year New Tools to Learn]]></title>
            <link>https://data-cruncher.medium.com/data-warehouse-project-new-year-new-tools-to-learn-ccee121f9f0a?source=rss-8ee9b5876f89------2</link>
            <guid isPermaLink="false">https://medium.com/p/ccee121f9f0a</guid>
            <category><![CDATA[data-warehouse]]></category>
            <category><![CDATA[ssis-package-sql]]></category>
            <category><![CDATA[sql-server]]></category>
            <dc:creator><![CDATA[Allan Miranda]]></dc:creator>
            <pubDate>Thu, 05 Jan 2023 09:45:04 GMT</pubDate>
            <atom:updated>2023-01-05T09:45:04.401Z</atom:updated>
            <content:encoded><![CDATA[<h3>Data Warehouse Project — New Year, New Tools to Learn</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ccee121f9f0a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Business Insights fr]]></title>
            <link>https://data-cruncher.medium.com/business-insights-fr-25d5fd571d3b?source=rss-8ee9b5876f89------2</link>
            <guid isPermaLink="false">https://medium.com/p/25d5fd571d3b</guid>
            <category><![CDATA[busines-intelligence]]></category>
            <category><![CDATA[business-insight]]></category>
            <dc:creator><![CDATA[Allan Miranda]]></dc:creator>
            <pubDate>Sat, 26 Nov 2022 12:34:39 GMT</pubDate>
            <atom:updated>2023-01-05T09:40:40.640Z</atom:updated>
            <content:encoded><![CDATA[<h3>Business Insights from Tableau Sales Analysis</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25d5fd571d3b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analysis of Datasets — Data Transition from Excel to T-SQL]]></title>
            <link>https://data-cruncher.medium.com/analysis-of-datasets-data-transition-from-excel-to-t-sql-a12bb4a0bb43?source=rss-8ee9b5876f89------2</link>
            <guid isPermaLink="false">https://medium.com/p/a12bb4a0bb43</guid>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Allan Miranda]]></dc:creator>
            <pubDate>Tue, 22 Nov 2022 16:46:13 GMT</pubDate>
            <atom:updated>2022-12-05T13:31:18.340Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Datasets Analysis — Data Transformation from MS Excel to MS SQL</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*rFgFhV9XWNMN87vfMPNNuQ.png" /></figure><blockquote>Every data has a journey, and every journey has a story to tell.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a12bb4a0bb43" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Deep Dive Journey in Data]]></title>
            <link>https://data-cruncher.medium.com/my-deep-dive-journey-in-data-c052a53761d2?source=rss-8ee9b5876f89------2</link>
            <guid isPermaLink="false">https://medium.com/p/c052a53761d2</guid>
            <category><![CDATA[data-journey]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-analysis-tool]]></category>
            <dc:creator><![CDATA[Allan Miranda]]></dc:creator>
            <pubDate>Sun, 13 Nov 2022 07:50:21 GMT</pubDate>
            <atom:updated>2022-12-05T13:38:47.187Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BsV8B44-_bfQV1sqwFstMA.png" /></figure><p>My journey into the world of data, along with some lessons I picked up along the road.</p><p>I studied Engineering in University of Santo Tomas (CUM LAUDE, B.S. ECE) with a few subjects on programming here in the Philippines. There, I picked up coding skills and how to develop analytical thinking.</p><blockquote>University of Santo Tomas (UST) is recognized as one of the top university (#4) in the Philippines as per EduRank report — <a href="https://edurank.org/geo/ph/">https://edurank.org/geo/ph/</a></blockquote><h3><strong>SEMICONDUCTOR / MANUFACTURING SECTOR</strong></h3><p>I got my first job as a cadet process engineer in a semiconductor manufacturing company [NXP, formerly Philips Semiconductors Philippines Inc], a supplier of microchips for various mobile phone handsets during the early 2000s. My initial experience with data analysis came from equipment parts, machine sensors, microchips, and other assembly line operations. Using MS Excel and some statistical modeling to enhance the various processes in the production area.</p><p>Looking back on this job experience, <strong>organizations have historically benefited from using data analysis way before data science become a ‘sexy job’.</strong> I worked on a project to evaluate different equipment parts used in the production line. When a certain component will wear out and need to be replaced, historical data is used. As a result, there is less downtime on the production line and less wastage of human resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*CN5CYbZru2PiioN5q6DXbA.png" /></figure><h3>MOBILE TELECOMS SECTOR</h3><p>I spent a brief time in the semiconductor industry and then most of my career (18+ years) went to the mobile telecoms sector.</p><p>In this domain, I had to work with a wide range of data sources, both organized and unstructured.</p><p>The dynamics of subscribers in any mobile operator’s network pose a challenging but a valuable source of getting insights for data analysis:</p><ul><li>concentration in specific locations (places of employment or festive events they went to)</li><li>services they use (both voice and non-voice), and</li><li>bandwidth of each service (low for text/SMS, high for mobile gaming),</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*nnO0tLKkPHbR_RuCpA-EUw.png" /></figure><p>I had the opportunity to engage in network planning for cellsites with a focus on <strong>transmission connectivity</strong> (wired-fiber and wireless-microwave radio) in the following dense populated areas during my lengthy career in the mobile industry:</p><ul><li>Dubai, United Arab Emirates (UAE) — as Transmission Manager (Project, Planning &amp; Analysis)</li><li>Kharkiv, Ukraine — as Network Planning Lead</li><li>Metro Manila, Philippines — as Network Planning Engineer</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*tfrcnwHfAk-Gqf_fN0gBpw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*a1dikxp_3e5EWRzsmjEFfg.png" /></figure><p>There are numerous methods and strategies that may be used in this discipline to obtain the relevant insights from data.</p><p>STRUCTURED DATA</p><p>A mobile operator’s NMS (network management system) is a fantastic source to mine important information from for structured and tabular data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*NwCs5cgclMeTK3uivXqFaA.png" /></figure><p>The NMS acts as a database and performance management platform with sets of alarms, monitoring and other functions.</p><ul><li>Data collection: Network element (NE ID), NE database schema, network traffic at a certain moment, NE faults, and VPN IDs configured in each NE on the transmission network are examples of data that can be collected in <strong>tabular format.</strong></li></ul><p>UNSTRUCTURED DATA</p><p>The bulk of the information needed for a transmission planning &amp; analysis job will be available in an <strong>unstructured format.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*RFhsInyJgD5j32KRn8nsbQ.png" /></figure><p>Traffic logs from NMS that needs further interpretation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*LYlVl27Rd5Nvihye2p_ZjQ.png" /></figure><p>Transmission tools: for NE schema and for capacity analysis</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*coOjhaaAVX9uQrWD30AJ3g.png" /></figure><p>Fiber route topology: for single point of failure and redundancy analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*m_QMvUk-eYJoQT-frg3VhA.png" /></figure><p>DATA LIFE CYCLE</p><p>Once all the data has been collected, I must use the information that is pertinent to the mobile operator’s business KPIs to make the necessary decisions.</p><p>The data life cycle for this domain can be summarize on below:</p><ul><li><strong>Business Understanding</strong> — Ask relevant questions and set objectives for the situation that needs to be addressed.</li><li><strong>Data Mining</strong>— Gather the data necessary for an specific project</li><li><strong>Data Preparation</strong> — Profiling, cleaning, and transforming the gathered data</li><li><strong>Data Modelling</strong> — Identify the relationships between the tables.</li><li><strong>Data Analysis</strong> — exploratory stage to determine important patterns and business insights.</li><li><strong>Data Visualization</strong> — make the most crucial information observable to corporate stakeholders by giving it life and communication using dashboards.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*omdqXBx8h52t0l4A627g-A.png" /></figure><p>The work includes regular data collecting and dashboard updates. The mobile operators are constantly adding new cellsites to provide more coverage and better service to their subscribers. The dashboards must reflect weekly any modification to the network, such as transmission expansion, modernization, and integration.</p><p>DESCRIPTIVE/DIAGNOSTIC DATA ANALYTICS</p><p>In retrospect, and based on the tasks I complete for various mobile operators, I can say that my role centers around two different types of analytics:</p><ul><li>Descriptive Analytics — tells what has happened.</li><li>Diagnostic Analytics —tells why it happened.</li></ul><p>Note: Since there is no data science team in the department where I work, I won’t be looking into the predictive and prescriptive analytics side of things, which involves developing algorithms and mathematical models.</p><p>Here are some interesting facts about the work I do related to data:</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c052a53761d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Two Million Rows + Two Data Analysis Tool (2021 Iowa Liquor Sales)]]></title>
            <link>https://data-cruncher.medium.com/liquor-sales-case-study-part-1-2million-rows-data-analysis-a2c6b9239f2?source=rss-8ee9b5876f89------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2c6b9239f2</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[data-analyst]]></category>
            <category><![CDATA[data-analyst-skill]]></category>
            <category><![CDATA[power-bi]]></category>
            <dc:creator><![CDATA[Allan Miranda]]></dc:creator>
            <pubDate>Tue, 25 Oct 2022 05:35:01 GMT</pubDate>
            <atom:updated>2022-10-25T12:50:37.124Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*VZnO-nRQ6XZs5lY6uKf-hg.jpeg" /></figure><h3><strong>PART 1 of a series.</strong></h3><p>Part one of a series of posts will include this case study. This post’s main focus is utilizing MS Excel and Power BI to extract, transform, and clean a huge dataset from <a href="https://data.iowa.gov/Sales-Distribution/2021-Iowa-Liquor-Sales/cc6f-sgik/data#revert">2021 Iowa Liquor Sales</a>.</p><pre>While Power BI (free desktop version) can manage datasets up to 1GB in size, MS Excel can only handle 1 million rows of data.</pre><pre>In this case study, I&#39;ll attempt to transform a dataset of more than 2 million sales records using Excel and Power BI.</pre><p>You may access the data source at <a href="https://data.iowa.gov/Sales-Distribution/2021-Iowa-Liquor-Sales/cc6f-sgik/data">https://data.iowa.gov/Sales-Distribution/2021-Iowa-Liquor-Sales/cc6f-sgik/data</a></p><p>Using the iowa.gov website’s filter tool, a preliminary search produced a dataset with 2,622,711 records and 24 columns (from January 1, 2021 to December 31, 2021).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jplABJHVkmC_LsahbT3uug.png" /></figure><p>The full datasets will be cleaned using a batch-based methodology. Here are the actions:</p><ol><li>Extract data in CSV format from the source (total of 12 sets, equivalent to 12 months for the year 2021).</li><li>Stage 1 data cleaning in Excel (retain only relevant columns, format the date column)</li><li>Stage 2 data cleaning in Power BI (transform the table for one CSV file only)</li><li>Bulk cleaning in Power BI that is automated for the remaining sets of CSV files (build an automated function from step #3).</li></ol><h3><strong>Extract Data From Source</strong></h3><p>To extract the datasets, use the filter feature on the data.iowa.gov website. The filter settings are displayed here for the entire month of January 2021 (from 01/01/2021 to 01/31/2021).</p><p>Save the CSV in Excel format. Follow the same steps for the remaining months, a year’s worth of data needs to be analyzed (total of 12 datasets).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c8hMajGkargAA5O3daSreA.png" /></figure><p>Rename the CSV files downloaded. The sets of data that were taken from the source and their matching filenames are listed below.</p><pre>File &quot;2021.01.csv&quot; refers to the month of January 2021. Rest of the file refers to succeeding months, in chronological order. The last file &quot;2021.12.csv&quot; refers to the month of December 2021.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*FRkLtg6dvxNWx0qe-Q6Z7A.png" /></figure><h3>Stage 1 Cleaning in Excel</h3><p>Open the 2021.01.csv file in excel. The file contains an initial 24 columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Qr8mVHd-_nOFnf6fI6mvQ.png" /></figure><p>The 24 columns’ names are listed below. On the CSV file, the highlighted (yellow) column names will be kept, while the others will be removed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*iFzSu6M6lWac6-0DWerSbQ.png" /></figure><p>Here is the result file after the columns were removed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*Kj9z6iFGGMQsDkf3PrBSPg.png" /></figure><p>The file’s date column is not correctly recognized by Excel. Excel, for instance, interprets the cell containing “<strong><em>01/04/2021</em></strong>” as <strong><em>April 4, 2021.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*ep9w9i6eTjQU_P5ZEw22nA.png" /></figure><p>Select all of the dates in the Date Column to fix this. Select “Text to Columns” from the Data tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HhNwF1J8eR7XVZLlH4tUqg.png" /></figure><p>Following a number of steps in the “Text to Columns”, Excel will display a Columns Wizard. Select “Date” and “MDY” as the data formats to ensure proper date formatting.</p><pre>MDY will format the cell &quot;01/04/2021&quot; as &quot;January 4, 2021&quot;.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*dmqLG3r42PE58_Kt58GM5Q.png" /></figure><p>When the preceding step is completed, Excel will recognize the cells as having the right date format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*mfc-XRS65F4IMYIeVEWnBw.png" /></figure><p>Repeat these steps for the remaining file sets. Save the files after editing each of the 12 sets of CSV files before moving on to the next step.</p><h3>Stage 2 Cleaning in Power BI</h3><p>Upload the first file (2021.01.csv) in Power BI.</p><p><em>Note: The Power Query Editor plane within Power BI will be used to carry out the following activities.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*zM4IrcAR47p2_K0_pf9aLA.png" /></figure><p>First, promote the first row as header for the table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*NuNIrLpQL6TiHJhnRj5X6Q.png" /></figure><p>Next, for some identified columns in the table, carry out the following actions: (a) Capitalize Each Word; (b) Trim; and (c) Clean.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*0cmdbpNI4bT33HiMCEoYGw.png" /></figure><p>The <strong>City</strong>, <strong>County</strong>, <strong>Category Name</strong>, and <strong>Item Description</strong> columns in the table should be converted using the aforementioned procedures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*de7oe-gq-iclibMTwwLR_w.png" /></figure><p>The results of the preceding Power BI tasks will be this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*Dm61YojszGxS6uLc9eJ27g.png" /></figure><p>Next, duplicate the Date Column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*aa2lm41XSbOLoQo6uif6ug.png" /></figure><p>Make two duplicates of the Date column, as seen below. These columns will be useful in the Data Visualization stage<strong><em> (the Data Visualization will be discuss on another part of this series).</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*bwnqW-2zplCeVoC8BxmNtg.png" /></figure><p>Next, rename the two new columns as “Month Name” and “Month”, respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1dxaOy5-edSOq19pw5Sy2w.png" /></figure><p>Extract the month name and month number for the above columns in the Power Query plane.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*NPvTGUu6yOlFTRzQKrCHPw.png" /></figure><p>To get the month name, go to Transform tab, click Date&gt;Month&gt;Name of Month.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*j_FLT74FY-pa-cXxHp-xWw.png" /></figure><p>To get the corresponding month number, click Date&gt;Month&gt;Month</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*tw7eyYpMqllADHNVtlwuHA.png" /></figure><p>Once completed, below is the output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6hVLC0SzsfhIYwhOJxWttw.png" /></figure><p>Next, go to Home tab, click the Choose Columns and tick those columns as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JyVn11yz0MsZaaO87SKloA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/346/1*0adt6wG-CEXoaCTz93g1Nw.png" /></figure><h3>Create an Automated Function in Power Query</h3><p>Below is a list of the tasks from the previous section that were completed on the table. In Power BI’s Power Query plane, they are referred to as “APPLIED STEPS”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b5_rcvjfPHj4hSKluTejHg.png" /></figure><p>To automate the previous section’s steps, duplicate the “Sales” table in Power Query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*_ifpgwX1z6IkhqCFvD2AUA.png" /></figure><p>Go to Advanced Editor of the “Sales (2)” table, edit the M language of this table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*jvSzuXIsL2Yj8VpQ2_C-dg.png" /></figure><p>M Code of “Sales (2)” table.</p><pre>M or &quot;mash-up&quot; is the language use in <strong>Power Query Editor</strong>.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*1wJYzXdm3v7P30Wfh0x4cg.png" /></figure><p>Modify the first two lines of the code.</p><p><strong>Existing Code:</strong></p><pre>let</pre><pre>Source = Csv.Document(File.Contents(“C:\Users\PC\Desktop\datasets\Set03\2021 Sales\2021.01.csv”),</pre><p><strong>Modified Code:</strong></p><pre>(month as text) =&gt;</pre><pre>let</pre><pre>Source = Csv.Document(File.Contents(“C:\Users\PC\Desktop\datasets\Set03\2021 Sales\”&amp; month &amp;”.csv”),</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WxwdY2kk_4yADKDr8RZ-7g.png" /></figure><p>Power BI will generate an automated function (<strong><em>fx</em></strong>) in response to the modifications made to the code in the Advanced Editor. The function will perform the “APPLIED STEPS” once a parameter <strong><em>“month” </em></strong>is type in the text box as show below. The <strong><em>month</em></strong> is the file name of source of data i.e <strong><em>2021.01</em></strong>, <strong><em>2021.02</em></strong> till <strong><em>2021.12</em></strong></p><pre>This custom function will pull the data inside an specified folder for a cluster of CSV files found inside that folder.</pre><pre>Folder path: C:\Users\PC\Desktop\datasets\Set03\2021 Sales\</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*2yYUuUbo7ZuEtBL9zBdffg.png" /></figure><p>To process the remaining batch of CSV files, create a new table in Power BI. In the Power Query Editor plane, go to Home tab, click “Enter Data”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*htxOVFgl3sByB5wQFUv1_g.png" /></figure><p>Once the Create Table appears, type the names of CSV files as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mIdGxoHnbjk4Zylu9GAwsA.png" /></figure><p>A new Table will appear in the Query section:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*vEpVM_AU7sxfwaHHAml0YQ.png" /></figure><p>To invoke the custom function, go to Add Column tab and click “Invoke Custom Function”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*yx4lrHYuxh9muC4GDeHjdw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*gGk5tKbwx2qdXKix7ygCzQ.png" /></figure><p>Power BI will start automating the tasks of data transformation without requiring the user to manually open and edit each of the 12 CSV files. To populate the Table, click the button on the newly added column “Sales (2)”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/207/1*_R5DC6CtG6d1Mfb19y0uQg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*niPhDnTTWw5IcY4i2LKIjQ.png" /></figure><p>The expanded table is shown as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fx43IdiLqBkLMylSgOwKPg.png" /></figure><p>Click both the “Date” and “Sale (Dollars)” column, go to Transform tab and click “Detect Data Type”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*XdbtCdsvcW_ChCrQGB1g0A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*9WZ835cJnjP6lIxLxUw8Bg.png" /></figure><p>These two columns will be altered in Power BI with the appropriate Data Type.</p><pre>Date -&gt; as Date and Sale (Dollars) -&gt; as Decimal Number</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*MjScVKBrNmZuib3gSoRM8w.png" /></figure><p>Rename the <em>Table </em>as <strong><em>Sales 2021</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*4VAW-EsXRd0gDFAIiU_6ig.png" /></figure><h3>Parting Words</h3><p>At this point, using Excel and Power BI, we had successfully transformed a sizable dataset (2,622,711 records).</p><p>Excel is used for batches of approximately “acceptable” file size during the <strong><em>first stage of data cleaning</em></strong>. Referring to the 2,622,711 records and divided by 12 files equals to 218,600 records for each file. Simple tasks like date format adjustment and column deletion can be handled by Excel.</p><p>Power BI has stepped up the pace in the <strong><em>second stage of data cleaning</em></strong> by transforming a sample file and then allowing us to design an automated procedure to finish the entire dataset.</p><p>By doing a batch-based methodology and harmonizing two tools, we use Excel as a preliminary data cleaning tool. We also reduce the “computing power” in Power Query since the CSV files were not directly feed from source to Power Query. The good news is that Power BI can still gather updated data even if changes are made in Excel afterwards. Power BI can retrieve the updates from the source CSV file by simply pressing the “Refresh Preview” button in the Power Query Editor plane.</p><p>We will examine the profile of the data we clean in the following series.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2c6b9239f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Temporary Links]]></title>
            <link>https://data-cruncher.medium.com/temporary-links-3c0e51444259?source=rss-8ee9b5876f89------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c0e51444259</guid>
            <category><![CDATA[power-automate]]></category>
            <category><![CDATA[automated-reporting]]></category>
            <category><![CDATA[power-bi-desktop]]></category>
            <dc:creator><![CDATA[Allan Miranda]]></dc:creator>
            <pubDate>Fri, 21 Oct 2022 02:48:09 GMT</pubDate>
            <atom:updated>2022-12-07T04:30:15.853Z</atom:updated>
            <content:encoded><![CDATA[<h3>Portfolio Project: Automated Reports</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*VKMk7eXBjp9AmD4SEbHSHQ.png" /></figure><p>One of the main benefits of automated reports is the <strong>time saved</strong> from manual data wrangling processes. The elimination of these manual processes <strong>frees up a substantial amount of time</strong> for employees, enabling them to concentrate on more value-added tasks that improve business insights and influence smarter decisions.</p><p>Power BI and Power Automate will be used in this project to show how important it is to do away with the time-consuming process of creating reports.</p><p>Note: Your organization should give you access on these services (SharePoint, Power BI and Power Automate) to perform this task.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/307/1*5wVXL5OlF2QmroUf-DVU1g.png" /></figure><p>Initially, build the report in Power BI Desktop for the datasets stored in a SharePoint Folder.</p><p><strong>Datasets:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*c1Sn65QJIZEVjEJ9C6Cf0w.png" /></figure><p><strong>Power BI Desktop report:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zSi8K4CGRZOd9a3Zp73SBA.png" /></figure><p>Publish the report. In this project, the report and dataset were published in the <strong>My Workspace</strong> in the Power BI service (app.powerbi.com)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pAbd1AOcj0RFrgr26oiBJQ.png" /></figure><p><strong>Report in Power BI service:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*Qw3vJVL4V-2KNrn3djtyvg.png" /></figure><p>The automated report can be triggered using Power Automate from the MS Power Platform.</p><p>In the Power Automate (Flow), create an automated flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KMCaNvSelF-ad3Hiy1Q-oQ.png" /></figure><p>Give a name for the <strong>Flow Name.</strong> Select the option listed below to start the flow that updates reports whenever a new file is added to the Sharepoint folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*AUSdErcxoWnO9Rd3cxrg3A.png" /></figure><p>Fill up the Site Address and Folder ID.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*I5t9gTLwNZIqKbi0VAEfcg.png" /></figure><p><em>Site Address is the </em><strong><em>root folder</em></strong><em> where the files are located in the online folder.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*ndB2dDkg7maj7W2vi0v35A.png" /></figure><p>When the trigger flow has been started, build an appropriate action. The report are to be updated as part of the automated process. Pick Power BI as the operation in this situation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*Hv8z7033c7wGZaY7yEsleQ.png" /></figure><p>In the Power Bi, choose the action mode —<strong> Refresh a dataset</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*MWBh_A8YAij4NE-f1TaT4g.png" /></figure><p>Then fill the necessary field on the Refresh a dataset. It requires Workspace where the report was located and the dataset source.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*H8pu3sKlYOzu-TzVb2pkXw.png" /></figure><p>Referring to the pervious screenshot of the Power BI service. Information for the above fields can be seen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*82-S14nDNURZrU5AB-4AtQ.png" /></figure><p>Here is the complete flow for this process. Save the entire flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*GtKeBV2VKtAi2wH_K31w6w.png" /></figure><p>To trigger the updating of the report. Upload these two files from the hard drive to the Sharepoint folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*6lw84cg7aLLOTyBKaREG5w.png" /></figure><p>After a while, check the Power Automate pane to see if the flow was completed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NfaD-QAR-qfh15TLw8KP2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*X9QrSy6eTmX0YfJBkuQPyQ.png" /></figure><p>Check the Power BI service, the number of files increased from 7 to 9. The number of invoice and sales also increased.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V4Ou3Mq5U4vML5r0I6GiYg.png" /></figure><p>As Power BI and Power Automate are seamlessly linked in the Power Platform, there are special features that can be automated as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*2eUES0muK10TF1W7gckYDw.png" /></figure><p>Automated flow — triggered by an event i.e. new file is added in a folder</p><p>Instant flow — manually trigger the automation</p><p>Scheduled flow — trigger by time i.e. updates the report at 6PM every evening.</p><p>IN CONCLUSION</p><p>Various corporate activities can be automated in order to improve resource allocation and boost team productivity. In particular, repetitive and time-consuming tasks might be examined to see if there is a chance to automate them in order to save time, money, and reduce the possibility of human error.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c0e51444259" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Scraping for Datasets: Turbocharge Your Skills on Power BI | Power Query]]></title>
            <link>https://data-cruncher.medium.com/web-scraping-for-datasets-turbocharge-your-skills-using-m-language-power-bi-356a20d75e4c?source=rss-8ee9b5876f89------2</link>
            <guid isPermaLink="false">https://medium.com/p/356a20d75e4c</guid>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[power-bi-step-by-step]]></category>
            <category><![CDATA[dataset]]></category>
            <category><![CDATA[web-scraping]]></category>
            <category><![CDATA[power-bi]]></category>
            <dc:creator><![CDATA[Allan Miranda]]></dc:creator>
            <pubDate>Mon, 19 Sep 2022 09:45:37 GMT</pubDate>
            <atom:updated>2022-12-03T01:38:33.407Z</atom:updated>
            <content:encoded><![CDATA[<p>The <strong>four easy steps </strong>to set up my own web scraping using Power Query and Power BI.</p><p>I will extract the video game sales dataset (61,951 data points) from this website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oabyefNg2QQ5nNWkO9PBvA.png" /></figure><h3>Step 1. Preparatory Stage</h3><p>I open the Power BI Desktop to initiate a connection with the source (a website) to get the dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*x5QgpImVF4-kkNMphW3cpA.png" /></figure><p>Website URL for Page 1 of the dataset:</p><p><em>https://www.vgchartz.com/games/games.php?page=</em><strong><em>1</em></strong><em>&amp;order=Sales&amp;ownership=Both&amp;direction=DESC&amp;showtotalsales=1&amp;shownasales=1&amp;showpalsales=1&amp;showjapansales=1&amp;showothersales=1&amp;showpublisher=1&amp;showdeveloper=1&amp;showreleasedate=1&amp;showlastupdate=1&amp;showvgchartzscore=1&amp;showcriticscore=1&amp;showuserscore=1&amp;showshipped=1</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*wnKtq69rWGVwSwmCDhBBww.png" /></figure><p>The setup allows me to connect anonymously. I will choose this option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*q1jD1kH7TBkhLUp_ySvElw.png" /></figure><p>I browsed all the tables that Power Bi identified in the URL. “Table 7” contains the dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*Ao0zgzmBCTXfsqHz9H-hlg.png" /></figure><p>Once I click “Transform Data” for Table 7, it’s time to clean up some columns and rows of the table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*FwGi-Z5zVtpuhGC4EJdCtA.png" /></figure><p>After transforming the data, I can view the Applied Steps in the Power Query. This will be used as the foundation for the web scraping tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*BjMtSCpJCRsPP58G-KL-yw.png" /></figure><h3>Step 2. Drilling Down on the M Query</h3><p>Invoke the Advanced Editor of the table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*G8Pqobb0AHkNHvLPGMIvhA.png" /></figure><p>Line 2 of the Query is code that I have to edit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*dyhuop9lGPqt3qygu3qXJw.png" /></figure><h3>Step 3. Setting Up a Custom Function</h3><p>Existing code for line 2:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*VTfDs9d0hGg72cO0QyEvgA.png" /></figure><p>New code for line 2:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*yJpwfny0kukrCZo6cnJ4ig.png" /></figure><p>The new code will help Power BI pull the datasets onto every page on the website.</p><p>To create a custom function, the below must be inserted in the first line of the Advance Query.</p><p><strong>(pagenumber as text) =&gt;</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*M7kgAbdC6N74gnrPiHB-rg.png" /></figure><p>The above code creates a loop using “pagenumber” as a parameter.</p><p><strong><em>Note:</em></strong> Make sure to set the pagenumber as text because the rest of URL is text type.</p><p>Next, I test the parameter if it is working properly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/1*t5e0N880RZ-vLeBTqshcsg.png" /></figure><p>Below is the output table for the custom function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*odLEB2Gl3L2D1RygrG750g.png" /></figure><p>Before moving to the next step, I rename the custom function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/252/1*YraQcGis2eicTu4JGt-BuQ.png" /></figure><h3>Step 4. Creating a Loop</h3><p>Now that the custom function is working, I need to create the values that the function will loop through.</p><p>Create a New Query -&gt; Blank Query on the Power Query pane.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/177/1*vgL7HFztiyHteBMK1gPN8g.png" /></figure><p>Open the Advanced Editor view for this new query. I will use the curved brackets <strong>{}</strong> to create a batch of list that the custom function will run through. The syntax is {N1..N2}. In this example, I want to go from the first page (<strong>N1</strong> is 1) up to the last page (<strong>N2</strong> is 1240) of the website for the datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*m_95LbxLmG7M0twhnkKGvw.png" /></figure><p>The list needs to be transformed into a table. In the Transform tab, click “To Table”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*ypxQ5MvCKQHPNnvU39kmzA.png" /></figure><p>After converting the list into a table, change the type to “Text.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*B2p2oNei-tWzFCVNWpAs6A.png" /></figure><p>Next, invoke the custom function to initiate the web scraping for the datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qpDpDIK1bHQRfvRydS9f3A.png" /></figure><p>Start populating the table by selecting the columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*3NQe2EzFjZEsCdem8QXnsg.png" /></figure><p>Below is the consolidated dataset that I scrapped using M Language in Power BI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*WI7XRBDw94sL_IwIfqobow.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=356a20d75e4c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>