ALLSELECTED

How to Use the Power BI DAX function ALLSELECTED

In this article, we’ll cover what the ALLSELECTED function is, how it works, and how to use it in Power BI.

What is the ALLSELECTED Function?

The ALLSELECTED function is a DAX function that returns a table consisting of all the columns and rows of a table, except for any filters that may have been applied to it. This function is often used in Power BI to analyze data across multiple dimensions.

How Does the ALLSELECTED Function Work?

The ALLSELECTED function works by removing any filters that may have been applied to a table. It then returns a table consisting of all the columns and rows of the table, except for the filtered rows.

For example, let’s say you have a table of sales data that includes the following columns: Product, Region, and Sales Amount. You want to analyze the total sales amount across all regions, but you also want to filter the data by a specific product.

To do this, you can use the ALLSELECTED function. By applying this function to the Region column, you can analyze the total sales amount across all regions, while still filtering the data by a specific product.

How to Use the ALLSELECTED Function in Power BI

To use the ALLSELECTED function in Power BI, follow these steps:

1. Open Power BI and load your data model.

2. Create a new measure by right-clicking on the table that contains the data you want to analyze.

3. Select “New Measure” from the context menu.

4. Enter a name for the measure and then enter the following formula:


Measure Name = CALCULATE(

Sum(Table[Sales Amount]),

ALLSELECTED(Table[Region])

)


5. Replace “Measure Name” with the name you want to give your new measure, and replace “Table” with the name of the table that contains your data.

6. Save the measure and then add it to your report.

By using the ALLSELECTED function in your measure, you can analyze data across multiple dimensions, while still applying filters to your data.

The ALLSELECTED function is a powerful tool in Power BI that allows you to analyze data across multiple dimensions, while still applying filters to your data. By using this function in your measures, you can gain valuable insights into your data and make better business decisions.

In summary, we covered what the ALLSELECTED function is, how it works, and how to use it in Power BI. We hope this article has been helpful and informative. If you have any questions or comments, please feel free to reach out to us.

Power BI DAX Training Courses by G Com Solutions (0800 998 9248)

Upcoming Courses

15-17 July 2024
16-18 September 2024
11-13 November 2024

Contact Us

    Subject

    Your Name (required)

    Company/Organisation

    Email (required)

    Telephone

    Training Course(s)

    Your Message

    Upload Example Document(s) (Zip multiple files)