Future-Proof Your Career, Master Data Skills + AI

Blog

Blog

# How To Use Simple Filters In Power BI

by | 7:00 pm EDT | October 28, 2020 | DAX, Power BI

In this article, I am going to give you an overview of simple filters in Power BI.

We have already done a few examples regarding this so it should not be too difficult to pick up.

I am doing these demonstrations in tables for a good reason. It is easier to understand how formulas work when you see the numbers since looking at visuals can sometimes be confusing. You may watch the full video of this tutorial at the bottom of this blog.

## Proper Usage Of Simple Filters

For example, in this Sales in NC measure, you do not have to use a FILTER function to generate a result.

This is because inside the CALCULATE function, the formula can already pick up what table you are referencing through the relationships in your model.

To show another example, I will create another measure called Sales in 2019.

I will use CALCULATE with Total Sales as the expression, put in the Year column of the Date table to serve as a simple filter, set it equal to “2019”, and then drag in our new measure.

To show an example of how it can go wrong, I will create a new measure called Sales of Product 100 to look at the sales of just one product.

I will use CALCULATE again and use Total Sales as the expression. Then, I will insert my Product Name column from the Products table, set it equal to “Product 100”, and drag in the measure.

Because of its initial context, the measure puts the Sales of Product 100 in every single row.

The CALCULATE function cannot differentiate based on the simple filter that we used since the Product Name column is in a table.

To fix this, you need to use the FILTER function and put it in the Products table.

As you can see, we finally got the value we needed just for Product 100.

The tricky thing here is that you get different results based on the different contexts that you have.

For example, if I use the Customer Name as my context and change back the simple filter without the FILTER function, the result is displayed normally.

The reason why I always default to using the FILTER function is because it would always work for both cases.

To avoid confusion, you should always use the FILTER function as best practice.

## Conclusion

In this post, we talked about simple filters in Power BI and the best practices regarding their usage.

We also determined how these filters relate to the CALCULATE function and context in general.

Next, we will be covering table functions like FILTER, when you might use them, and how they work within Power BI.

All the best,

Sam

## How to Calculate Age in Excel: 5 Best Methods Explained

Looking to calculate age in Excel? Well, you're in the right place. Whether you need to find the age of...

## Funny ChatGPT Prompts: 20 Hilarious ChatGPT Ideas

In a world where technology continues to amaze us, we have now arrived at the point where we can have a...

## Power BI Slicer Search: User Guide With Examples

Ready to get started with the Power BI slicer? This feature will allow you to filter and slice your...

## SUMPRODUCT Multiple Criteria: Explained With Examples

Most Excel users think that the SUMPRODUCT function in Excel helps only to multiply the numbers in...

## Data Analytics Outsourcing: Pros and Cons Explained

In today's data-driven world, businesses are constantly swimming in a sea of information, seeking the...

## How to Embed Power BI in Sharepoint: 4 Simple Steps

Embedding Power BI reports in SharePoint Online is a powerful way to display interactive data...

## The Top 5 Power BI Alternatives in 2023

Power BI has established itself as a powerful business analytics platform, offering a wide range of...

## Power BI Waterfall Chart: A Detailed User Guide

In the world of data visualization, charts speak louder than numbers. If you're looking for a way to...

## Power BI Import vs Direct Query: Which is Better & Why?

In the world of data analysis, Power BI offers you a range of tools to connect to your data sources....

## Power BI Certification: Everything You Need to Know

In today's data-driven world, the ability to transform raw numbers into meaningful insights is more...

## Power BI Bookmarks: The Ultimate Guide

When working with data, bookmarks offer a streamlined and personalized way to navigate through large...

## Power BI Default Slicer Value Explained

One of the key features of Power BI is the slicer, which allows you to filter your data based on...