Category: Analytics, BI & Reporting

Why Bother to Use Pandas “Categorical” Type in Python

When we process data using Pandas library in Python, we normally convert the string type of categorical variables to the Categorical data type offered by the Pandas library. Why do we bother to do that, considering there is actually no difference with the output results no matter you are using the Pandas Categorical type or … Continue reading Why Bother to Use Pandas “Categorical” Type in Python

Workaround of the Power BI Guest User License Assignment Issue

I have recently been working with an insurance client to help them design a solution to distribute Power BI app to external guest users with Azure AD B2B. I have designed this solution based on Microsoft Power BI content external distribution guideline whitepaper: Distribute Power BI content to external guest users using Azure Active Directory B2B. … Continue reading Workaround of the Power BI Guest User License Assignment Issue

Power BI – GMROI Measure

GMROI (Gross Margin Return On Investment) is one of the most popular metrics, commonly used in retail industry, for inventory management. Retailers are short-term investors and the "buy and hold" strategy does not work in retail industry. Instead of having the cash frozen in inventory, it is crucial to keep cash flowing to continually purchase, mark … Continue reading Power BI – GMROI Measure

DAX – Find the Items Ranked in Top n for Multiple Periods (with Dynamic Slicing)

One of my previous blog post introduces how to find the items which are ranked in top n for multiple periods, using the INTERSET and TOPN functions. However, that approach needs to hard-code the periods and the number of top items in the DAX scripts. This blog post introduces an approach that allows users to … Continue reading DAX – Find the Items Ranked in Top n for Multiple Periods (with Dynamic Slicing)

R Visual – Create Gartner Magic Quadrant-Like Charts in Power BI using ggplot2

In this blog post, I am going to create a R visual that renders the Gartner magic quadrant-like charts in Power BI using the ggplot2 package. A dummy dataset will be created, including three columns, the "Company" column holding the name of the companies which will be ranked in the quadrant chart, the "ExcutionScore" column … Continue reading R Visual – Create Gartner Magic Quadrant-Like Charts in Power BI using ggplot2

DAX – Find the Items Ranked in Top n for Multiple Periods

Update - I have suggested another approach here that allows users to dynamically specify the periods and the number of top items to evaluate, using the interactive dashboard slicers. When analysing the best performers against a specific measure such as the best sold products, we sometimes need to take multiple periods into consideration. For example, … Continue reading DAX – Find the Items Ranked in Top n for Multiple Periods

R Visual – Build Eurovision Voting Network Chart in Power BI

I have been watching Eurovision competitions for several years. I personally think the voting results from Eurovision competitions can be a very good source for the research of relationships between European countries. In this blog post, I will create a social network R visual using iGraph package and use the visual to analyse the voting … Continue reading R Visual – Build Eurovision Voting Network Chart in Power BI

R Visual – Building Facet Grid in Power BI

The pbix file created for this blog post can be found in my GitHub here. Introduction Since Power BI started to support R visual, it has become difficult to criticise Power BI's visualisation capability because we can now take full advantage of R's powerful visualisation packages such as ggplot2 to create Power BI reports. Unlike … Continue reading R Visual – Building Facet Grid in Power BI

DAX – Ranking with Hierarchy Drill-Down

Problem We can use the DAX RANKX function to return the rank of an item based on one of its numerical attribute. For example, we can create a measure using RANKX function to calculate the ranks of the product categories based on the order quantity within the product categories. This measure will normally work fine … Continue reading DAX – Ranking with Hierarchy Drill-Down

DAX – Dynamically Showing Title by Slicer in Power BI

When building a Power BI report page for analysing data by a specific dimension (e.g., customer, product and category), we often need to dynamically show the title of currently selected item(s). One trick to show the title based on the current filter context is to use Multi-Row Card visual (we can also use the single … Continue reading DAX – Dynamically Showing Title by Slicer in Power BI