# NOT

## Syntax of the NOT Function

The syntax for the NOT function is straightforward. It takes only one argument, which is a logical expression. The syntax is as follows:

NOT(❰logical_expression❱)

``` The function returns the opposite of the logical expression. If the logical expression is true, it returns false. If the logical expression is false, it returns true. Example Usage of the NOT Function To understand how the NOT function works, consider the following example. Suppose we have a table of employee data, which contains the following columns: - Employee ID - Employee Name - Department Name - Salary - Status Suppose we want to filter the data to only include employees whose status is not "Inactive." We can achieve this using the NOT function. The DAX formula would be as follows: ```

FILTER(EmployeeData, NOT(EmployeeData[Status] = “Inactive”))

``` In this formula, we are using the FILTER function to filter the EmployeeData table. The second argument to the FILTER function is the filter expression. We are using the NOT function to return the opposite of the expression "EmployeeData[Status] = "Inactive"." This expression evaluates to true for employees whose status is "Inactive." The NOT function returns false for such employees, which filters them out of the data. Using the NOT Function with Other Logical Functions The NOT function can be used in combination with other logical functions in Power BI. For example, we can use the AND function to filter data based on multiple conditions. The syntax for using the AND function with the NOT function is as follows: ```

FILTER(EmployeeData, NOT(AND(❰condition_1❱, ❰condition_2❱, …)))

``` In this formula, we are using the AND function to specify multiple conditions. We are then using the NOT function to return the opposite of the combined logical expression. This filters out the data that satisfies all of the conditions. The Power BI DAX function NOT is a useful function for filtering data in Power BI reports. It returns the opposite of a given logical expression. We can use it in combination with other logical functions to filter data based on multiple conditions. By understanding how to use the NOT function, we can create more effective and efficient Power BI reports. Power BI DAX Training Courses by G Com Solutions (0800 998 9248) Power BI DAX Intensive Training Course £1,260.00 – £31,860.00 Select optionsContinue Loading Done Power BI DAX Introduction £474.00 – £11,700.00 Select optionsContinue Loading Done Power BI DAX Intermediate £474.00 – £11,700.00 Select optionsContinue Loading Done Power BI DAX Advanced £474.00 – £11,700.00 Select optionsContinue Loading Done Upcoming Courses 16-18 September 202411-13 November 2024 Contact Us Subject Your Name (required) Company/Organisation Email (required) Telephone Training Course(s) Power BI Intensive TrainingPower BI introduction Power BI IntermediatePower BI AdvancedDAXPower Query MPower BI CertificationPower BI AdministrationPower PlatformPower AutomatePower AppsOTHER Your Message Upload Example Document(s) (Zip multiple files) ```
``` ```
``` ```
``` ```
``` ```
``` ```