Sort a Column with a Custom Order in Power BI

I have previously written about how to sort a column by another column, and I used Month Names as an example. However, still, many are unaware that the same technique with slight modifications can be applied to any other columns. You can have a text column in your slicer (product category for example), and sort Read more about Sort a Column with a Custom Order in Power BI[…]

Caution When Using Variables in DAX and Power BI

I have written another blog post about variables previously and explained how useful variables are. Variables in DAX are helpful in both readability and also the performance of your code. However, there are scenarios that you have to be careful when you use variables. Because variables are stored, they might return a result that is Read more about Caution When Using Variables in DAX and Power BI[…]

Write Conditional Statement Using SWITCH in DAX and Power BI

Conditional expressions are one of the most commonly used expressions in any language as well as DAX. However, in DAX, if you have multiple IF THEN expressions, there is an easier way of doing it; using a function called SWITCH, this blog is about how you can use switch function in DAX and Power BI Read more about Write Conditional Statement Using SWITCH in DAX and Power BI[…]

Add or Edit Columns When Importing Data from Analysis Services into Power BI

If you use SQL Server Analysis Services as a data source for Power BI, you have two types of connection; Live Connection or Import Data. If you use Import Data, you can select columns and measures to be imported into Power BI. However, what if you want to add more columns to it, or edit Read more about Add or Edit Columns When Importing Data from Analysis Services into Power BI[…]

All in One: Script to Create Date Dimension in Power BI using Power Query

I have written multiple blog posts about how to create a date dimension using Power Query, however, the purpose of those blog posts was to teach you how to do it yourself, learn the process and also build the date dimension that you can use. Sometimes, however, you just want to create a date dimension Read more about All in One: Script to Create Date Dimension in Power BI using Power Query[…]

Age in Years Calculation that works for Leap Year in Power BI using Power Query

I wrote a blog article yesterday about the Age calculation in Power Query, and how easy it is to calculate things. I mentioned in the blog that it won’t be precisely correct for scenarios that include leap years. However, I got some concerns that people are not still using it because they think this is Read more about Age in Years Calculation that works for Leap Year in Power BI using Power Query[…]

Age Calculation in Power BI using Power Query

Power Query has a simple way of calculating the age. However, because DAX is the popular language in many calculations in Power BI, many are not aware of this function in Power Query. In this blog article, I am going to show you how easy is to calculate Age in Power BI using Power BI. Read more about Age Calculation in Power BI using Power Query[…]

Share Different Visual Pages with Different Security Groups in Power BI

I have written a dozen of blogs and a book about Power BI row-level security and the security on the dataset. However, I always get this question that: “What if I want some people to see only a few pages of my report, and some others to see other pages?” or “How can I put Read more about Share Different Visual Pages with Different Security Groups in Power BI[…]

Get the List of FOLDERS only in Power BI using Power Query

There are times that you need to get the list of FOLDERS and not just files. Of course folder itself (without considering files in it), doesn’t contain data to be used for a report. However, sometimes, even the folder name might contain some useful information. The Get Data From Folder option in Power BI will Read more about Get the List of FOLDERS only in Power BI using Power Query[…]

Create Row Number for Each Group in Power BI using Power Query

If you want to create a row-number statically as a pre-calculation in Power BI, then Power Query has a very simple way of doing it; Add Index Column. However, the Index column creates the row number regardless of any grouping or categorization. sometimes you want to take that into account too. There is a little Read more about Create Row Number for Each Group in Power BI using Power Query[…]