…huh?? “Squeeze your glutes!” This is the phrase I always hear when I am working out. I never really understood what it meant and thought maybe it is just to tighten my butt muscles somehow. I didn’t think it was such an important thing to do until I looked more into it. so what does it mean? Squeezing your glutes refers to the action of contracting or tightening the muscles in your buttocks, specifically the gluteus maximus muscle.
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by Peter Hui
DAX, SQL and R - Cumulative Sums with groupings
How do you do cumulative sums in Power BI — DAX, SQL and in R? This article will give you the code required to do these things. With a few tweaks here and there I think you can do this very easily in the future. There are many articles out there to teach you how to do this, but it’s mostly focused on just one…
Power BI Modelling — Inheriting a messy model.
Photo by Nicolas Picard on Unsplash Have you ever inherited a messy model? It’s like getting caught in a spider’s web and being devoured whole. What do I mean by devoured whole? It means that if you don’t ask the right questions, you can spend your whole day working out measures, queries without getting anywhere! I have been there. Pictures are worth a thousand words. Take a look at this type of model. Each ‘square’ here is a table.
Power BI — An analogy with cup cakes!
Let’s not forget dataflows. Power BI has machine learning models, regression and binary models available for users to deploy as well. So how does dataflow fit in? Let’s go back to our analogy. Let’s say your bake shop is now doing very well, you want to maintain consistency. Instead of having bakers get ingredients each and every time, dataflow works much like how a pipeline works to deploy only the ingredients to the baker. It provides consistency and it saves time.
Power BI Modelling -tips and tricks
Let’s talk about the two options to consolidate data tables. There are two options, DAX and Power Query. Using DAX to append the tables together. It’s not advised, but let’s go through it anyway because it’s the quickest; you won’t have to reload any of the data into the model. To do this in DAX you can use the UNION function and append the tables together. The join it against the previous dimension tables.
Power BI - Working with Time Intelligence
Here is a simple Date table I’ve created using the below. DATE_TABLE = CALENDAR(DATE(2019,01,01),DATE(2022,01,01)) In this code, Power BI generates all the dates from Jan 1st 2019 to Jan 1st 2022. This is how you can create a date table using DAX. The key word here is all, remember time intelligence functions will not work with missing dates. Here I also added an extra column, call “Month_Year” and it’s done by adding the below as a new column.
Power BI Modelling
This is my question, I want to report on my inventory and transactions by day. Each day has sales so I want to know my sales. Here we can already tell we want to report on inventory and sales. These will likely be our fact tables. It sounds like there is a date time dimension involved so we probably need a day time table. These are our fact tables we want to use, Image by author We will also need a table to join the inventory and transactions table together, so we can filter by the dates.
Power BI + Power Automate - File Monitoring
Using table functions to monitor SharePoint files and setting alerts using Power Automate Photo by Murai .hr on Unsplash Do you use SharePoint? Personally, have not liked it all that much. I have had to use it a lot in the past year because of the pandemic. I have fallen in love with it to say the least. SharePoint demonstrated its usefulness when I had to ask various units to fill in workbooks on SharePoint. There was a total of 50 workbooks.
Is music a reflection of society?
A data-analytical exploration to find interesting trends in the music industry Photo by Jason Rosewell on Unsplash Remember when you were a teenager and your parents told you to stop listening to that heavy metal band (in my case, it was Rhapsody), because if you kept listening, you would end up becoming the “drug-abusing, good-for-nothing” musicians that appeared in the album cover? (Ah, those lovely stereotypes…) Well, guess what?
How to get started on Kaggle Competitions
Step by step guide on how to structure your first Data Science projects on Kaggle Photo by Jonathan Chng on Unsplash If you are starting your journey in data science and machine learning, you may have heard of Kaggle, the world’s largest data science community. With the myriad of courses, books, and tutorials addressing the subject online, it’s perfectly normal to feel overwhelmed with no clue where to start.
4 Steps to be a Great Data Analyst
Photo by Jamie Haughton on Unsplash 5 months ago, I graduated from Singapore’s Nanyang Technological University and landed a role as a Data Analyst in a tech firm in Singapore. As a data rookie with little formal technical training in computer science or statistics, I was nervous about the prospect of being surrounded by data experts at work but also immensely grateful for the opportunity to learn from them.
PyCaret 2.2 is here - What’s new?
PyCaret 2.2 is now available for download using pip. https://www.pycaret.org We are excited to announce PyCaret 2.2 — update for the month of Oct 2020. PyCaret is an open-source, low-code machine learning library in Python that automates machine learning workflows. It is an end-to-end machine learning and model management tool that speeds up the machine learning experiment cycle and makes you more productive.
Power BI modelling
Some tips. Wish I had known them before. Photo by tian kuan on Unsplash When you think of modelling, what do you think of? A lot of intricate joins, look ups, or maybe just frustrations? Have you experienced this before? You have a measure, but it doesn’t give you the correct answer. You wonder why. You are not exactly sure why, so you tweak the measure. Perhaps it’s something in the table, maybe a data issue, so you tweak it in Power Query as well.
Creating and Using R Functions
Here is the key — we need to load in one of the files manually and apply our transformation steps. I want to group by Year and Sex and summarize by average salary. These are the transformation steps I want to apply to all the files. Dataset_2007 %>% # I manually loaded this file from Import Dataset on R Studio group_by(Year,Sex) %>% summarize(Avg_Sal = mean(Salary, na.rm = T)) Let’s check if it works. You have to select the script and press cntrl+R which is to run the script.
Functions in Power BI
To get started, let’s load in all our files in a folder. image by author After you’ve loaded all your files, you should see them displayed as below. Let’s start by creating a “Duplicate” of the main file — we want to build a function from this duplicate. Image by author Now that there is a duplicate, we keep only the first row to build the function. Image by author Power BI keeps only the first row. Nice.
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with Peter
Contact Peter, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack