Posts

Showing posts with the label Data Modelling

Description for everything

Image
Just think of a scenario, you are working on a Power BI report that is created by multiple developers and now you are debugging it. If you have no knowledge of the ins and outs of it you will get jaded by it very soon. But what if you see some description or textual information within the report? That will be the ray of light 💡.  As a best practice, if you are creating any report from scratch try to add a description to almost everything. Starting from the tables, columns, measures, calculation groups, field parameters..... How to do it? Okay, let's start by providing a description of the tables. I am using Sample Superstore data and want to provide a description - Contains sales data. To do so, go to the data model view. Select the table where you need to add the description. Under properties, you can provide a description under the description section. Easy peasy lemon squeezy!! That's basic and at Analyst in Action, we always strive to go beyond the basic knowledge. Let...

Introduction to TMDL

Image
Let's think of a scenario where you have asked to batch edit your long list of DAX, create repetitive measures over and over, copy whole set of measures from one PBIX to another. Until January 2025, if I encounter all those scenarios I always think of some external tools to achieve it. But but but Power BI does listen to you 😂 and now we have TMDL (Tabular Model Definition Language). In today's blog we will explore the capabilities of TMDL.  Before we get started, TMDL is still in Preview features. You need to enable it under your settings and restart your Power BI desktop. You will see an icon for TMDL on the left pane. To learn more about TMDL do visit the detailed article from Microsoft Once you click on the TMDL it will lead to a separate section with all the introductory steps. To start with, we will change the summarise by for all columns from none to sum. Just drag and drop the Sample Superstore table. You can edit the none to Summarise by section for every column to S...

Use Relationship in DAX

Image
Data modeling is an essential part of creating perfect visuals. While creating complex data models there can be a case where you can find an inactive relationship represented by dotted lines and it occurs because you already have an active relationship between the two tables. But as a developer, you need to use both the relationship. How can it be done? You can use "Use Relationship" in such cases. Use relationship can be added to your DAX and act as a modifier or enhancer for calculation. It activates the inactive relation. But make sure you have an inactive relationship in place before using the use relationship function. Let's see how it works on Sample Superstore data. In my fact table I have two dates- Order date and Ship date. I am making the two relations between my date table and fact table. The relation between the sample superstore (date) to date table (date) is active while the relation between the sample superstore (ship date) to date table (date) is inactive ...

Implicit V/S Explicit Measures in Power BI

Image
As a Power BI developer, whenever you connect a dataset, you often see sigma in front of different fields in your table. What is the significance of this sigma and how will it hamper the performance of your dashboard? We will answer all those questions in this article. Let's dig deeper into all the fields with some symbols such as sigma called Implicit measures. Such measures are automatically created by Power BI which is a default setting so whenever you drag such a measure into a table or any visual it will provide a sum (if the sigma is in front of that field). Let's try it with a sample dataset. I am using the SampleSuperstore dataset. We will be checking the profit associated with different categories. I am taking both category and profit in the table. In the below-mentioned image, you can see we are getting profit with every category. Easy peasy!!!! in such a case default does the job but what if we don't want a sum. To obtain that go to the columns and select the dro...

Calculated column and Measures in Power BI

Image
This blog may seem to be very elementary but I firmly believe it is the foundation of DAX in Power BI. Our nucleus for today is Calculated columns and measures in Power BI. If you are a Power BI user you must have come across these terms. You can find both of them in the home tab (placed next to each other). We will highlight the difference between both of them and the limitations associated with them. Let's get started!! You can easily increase the table size by adding calculated columns to it and you can provide a DAX or logic for that column. The most pivotal thing we need to be aware of such columns is that they are calculated at the row level. There are situations when you can't create a relationship between tables in such cases calculated columns can come to the rescue. But be aware that the calculated column occupies a space in the memory which can be good or bad in different scenarios. If the DAX for your calculated column is complex then it can provide you a much bette...

Difference between Related and Lookupvalue in Power BI?

Image
You must be aware of the purpose and significance of Vlookup in Excel. But when it comes to Microsoft Power BI there is no Vlookup in it. Power BI provides you Related and Lookupvalue which is quite similar to Vlookup in Excel. If you aren't familiar with the Vlookup kindly refer to our blog . Let's get started with the purpose of both functions. You will be shocked to know that both of them will give you the same result. Because it follows the same principle of Vlookup i.e. searching for a particular value in a column and returns a value from a different column (different table). In this blog, we will showcase how and when to use related and lookup values. We will be using Sample Superstore data. The question that comes to my mind is when to use the related functions? So there are certain criteria to be met before creating a column with related. One of the conditions is that both the tables (one where we are creating a column and the other will be from where the value will com...

Difference between Star schema and Snowflake schema

Image
Are you aware of the schema in the database? Why do we need schema? Let's answer all these questions. Schema primitively means a structure or a framework that can make your data organized. We know that data alone doesn't make any sense until and unless it is organized and structured which represents the logic of the data. When we talk about data warehouse fact tables and dimension tables make a schema. Mainly there are three types of schema- Star Schema, Snowflake Schema, and Galaxy Schema. In this blog, we will point out the difference between Star Schema and Snowflake Schema. Basically, the Snowflake schema is an advanced (pro) version of the star schema. What is a Star Schema? It's a basic structure where the fact tables are placed at centered and they are surrounded by dimension tables. It will help you to differentiate your quantitative data from qualitative data. But why it is named star? To answer that you need to see the formation of fact tables and dimension tables...