DAX Variables: Better Readability, Consistency, and Performance in Power BI Calculations

Have you ever had a scenario that you need to use part of your calculation multiple times? You might go and create a table or column for that and then re-use it. However, there are times that you just need that calculation to be re-used multiple times within one place. DAX variables can help you Read more about DAX Variables: Better Readability, Consistency, and Performance in Power BI Calculations[…]

Calculate Totals in Power BI: Using Iterators in DAX

The total value that you see in a table is not actually SUM of all values in that column, it is, in fact, the calculation, when there is no filter. This, however, might not be the calculation that we want sometimes. we might want this value to be the sum of values of that column Read more about Calculate Totals in Power BI: Using Iterators in DAX[…]

Same Period Last Year to Date DAX Calculation in Power BI

I have previously written about how to calculate the same period last year calculation and compare this year’s values with the last year’s values. However, sometimes, you don’t yet have the full year, especially for the current year. You might want to compare this year’s value with the last year’s value up until the same Read more about Same Period Last Year to Date DAX Calculation in Power BI[…]

Power Query Parameters Vs. What If Parameters: Power BI Implementation Use Cases

I have written about both types of parameters in Power BI; Power Query parameters and also the What If parameters. However, still many people are not aware that these two are different, and serve different purposes. In this blog article, I am explaining the differences between these two types of parameters, as well as the Read more about Power Query Parameters Vs. What If Parameters: Power BI Implementation Use Cases[…]

Power BI What If Parameter for Getting the Sales of X months ago: Use Case Scenario

There are two types of parameters in Power BI, Power Query parameters, and What if parameters. In this article, I’m going to explain a very useful use case of the what-if parameters, and if you haven’t ever worked with it, it is a great way to understand what is What If parameters and what things Read more about Power BI What If Parameter for Getting the Sales of X months ago: Use Case Scenario[…]

Slicer with AND condition in Power BI

The default behaviour of the slicer in Power BI is that it shows the result of OR when you select multiple items. For example, if you have a slicer for product colour, and then you select both “Black”, and “Blue” the result would be all records that have “Black”, OR “Blue”. Of course, you won’t Read more about Slicer with AND condition in Power BI[…]

Find The Data Value using LookupValue DAX Function in Power BI; Simple and Useful

LookupValue function is neither a new function in DAX nor a complex one. However, I figured out in my training courses and presentations, that there are still a few people aware of this function. This is a very simple, yet powerful function in DAX which is particularly helpful whenever you are looking to find a Read more about Find The Data Value using LookupValue DAX Function in Power BI; Simple and Useful[…]

Creating a List of Numbers or Dates in Power BI using GenerateSeries Function in DAX

If you ever need to create a list of numbers (either decimal or whole number), or list of dates and times, there is a very simple and useful function in DAX which helps. GenerateSeries is a simple function to use to create a list. In this article, I’ll explain how you can use this function. Read more about Creating a List of Numbers or Dates in Power BI using GenerateSeries Function in DAX[…]

Calculate Duration in Days Hours Minutes and Seconds Dynamically in Power BI using DAX

In Power Query, there is an easy way to use Duration and get the number of days, hours, minutes and seconds from it. However, sometimes you need this calculation to be dynamic as a measure in DAX. I had that requirement too. And I wrote a simple DAX calculation which will give you the result. Read more about Calculate Duration in Days Hours Minutes and Seconds Dynamically in Power BI using DAX[…]

Using DataTable DAX Function for Creating Structured Table in Power BI

In another blog article, I explained how easy is to use table constructor in DAX to create a data table fast in Power BI. However, that method has some limitations, such as not being able to name columns or set their data types. In this blog post, I’ll explain about DataTable function in DAX which Read more about Using DataTable DAX Function for Creating Structured Table in Power BI[…]