MAXX

How to Use the Power BI DAX function MAXX

What is MAXX Function?

MAXX function is a DAX function that allows you to find the maximum value in a column or a table. This function takes two parameters: the first parameter is the table or column that you want to find the maximum value for and the second parameter is the expression that you want to evaluate.

Syntax for MAXX Function

The syntax for MAXX function is as follows:


MAXX(Table/Column, Expression)


- Table/Column: The table or column that you want to find the maximum value for.

- Expression: The expression that you want to evaluate.

How to Use MAXX Function in Power BI

To use MAXX function in Power BI, follow the steps given below:

1. Open Power BI Desktop and click on the "Get Data" button to import your data.

2. Once you have imported your data, create a new measure by going to the "Modeling" tab and clicking on "New Measure".

3. In the "New Measure" dialog box, give a name to your measure and enter the expression that you want to evaluate.

4. Enter your MAXX function in the expression section. For example, if you want to find the maximum value in the "Sales" column, your MAXX function would look like this:


MAXX(‘Sales’, [Sales])


5. Click on the "OK" button to create the measure.

6. Once you have created the measure, you can use it in your visualizations and gain insights from your data.

Examples of MAXX Function

Here are some examples of how MAXX function can be used in Power BI:

Example 1: Finding the Maximum Sales Value

Suppose you have a table called "Sales" that contains information about sales made by a company. To find the maximum sales value, you can use the MAXX function in the following way:


MAXX(‘Sales’, [Sales])


This will evaluate the expression [Sales] for each row in the "Sales" table and return the maximum value.

Example 2: Finding the Maximum Sales Value by Each Region

Suppose you have a table called "Sales" that contains information about sales made by a company in different regions. To find the maximum sales value by each region, you can use the MAXX function with the GROUPBY function in the following way:


MAXX(GROUPBY(‘Sales’, [Region], “Total Sales”, SUMX(CURRENTGROUP(), [Sales])), [Total Sales])


This will group the "Sales" table by the "Region" column and calculate the total sales for each group using the SUMX function. The MAXX function will then return the maximum total sales value for each region.

In this article, we have discussed how to use the Power BI DAX function MAXX to gain insights from your data. MAXX function is a powerful function that can help you find the maximum value in a column or a table with ease. By following the steps given in this article, you can easily use MAXX function in Power BI to analyze your data.

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

Upcoming Courses

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)