Skip to main content

Posts

Showing posts with the label filters in power bi

Do we really need Keepfilters in DAX?

Writing a DAX can be tricky at times and making it efficient for the system is always a challenge for a BI Developer. The most prominent example is the use of filters in DAX. There are zillion ways to filter something in DAX and attain the same result but when you look behind the scenes you will get to know what effect it makes on performance. Looking at the above image it all looks the same. In this blog, we will cover the most common scenarios to use filters including the use of filter with all, filter with values, and keepfilters. I am using the sample superstore data for demonstration. The idea is to get sales for "Tables". The DAX is as follows. The most common and basic approach will be this. Looking at the matrix it gives the sales amount of tables as the total sales for "Furniture". If we use this in a table or matrix results can be perplexing for the user. Considering the total it does make sense. But we want every sub-category to get their respective sales

Types of Filters in Power BI

In today's blog, we will take a deep dive into the basic functionality of Power BI. We will talk about the types of filters available in the Power BI whether in the query editor or at the visualization level. Let's start with the purpose of using filters that is limiting the rows on the basis of a condition or restrict the data which you don't want to showcase in your visualization. There are many types of filters available in Power BI. We will start with the filters available in the query editor. I am considering the sample superstore data. So, I have imported the Orders and Returns table and we will be applying the filter on the order date. When we select the date filters it will lead to a pop-up where you can select basic and advanced filtering currently I am selecting the advanced version. The filter will limit the data for a particular duration as you can see in the image below. You can remove the filter just by selecting the clear filter. Just to check the code of the