Open In App

Power BI – DAX Not Function

Improve
Improve
Like Article
Like
Save
Share
Report

To generate formulas and expressions in Excel data models for Power BI, Analysis Services, and Power Pivot, Data Analysis Expressions (DAX), a group of functions and operators, can be combined. Data Analysis Expression is a feature of the Power BI toolset that enables business analysts to maximize the value of their datasets. These expressions make the process of creating reports faster and more enjoyable for the data analyst. Logical functions, which are used to combine many conditions and decide if a condition is true or not, enable the introduction of decision-making. Logical functions provide details about the values or sets in an expression when they are applied to it.

DAX Not Function

Here we are applying the Not function on Fact Internet Sales and Dim Date sample data. It is dummy data that keeps the sales record of a company, as can be seen in the following screenshot:

Fact-Internet-Sales

 

Dim-Date

 

DAX Logical NOT tells FALSE to TRUE or TRUE to FALSE conversion is possible by using this. Below is the syntax for logical NOT function:

Syntax: NOT(<logical expression>)

Parameter

logical expression- A quantity or expression that can either be TRUE or FALSE when evaluated.

Output

TRUE OR FALSE.

Example1: The Not function negates the logical expression1 and returns a Boolean value in a New Column.

logical1 = IF(SUM(FactInternetSales[UnitPrice]) ,SUM(FactInternetSales[TotalProductCost]))

Column 1 = NOT([logical1])

Not-function-example1

 

Example 2: The Not function negates the logical expression2 and returns a Boolean value in a New Column.

logical2 = IF(SUM(FactInternetSales[UnitPrice]),SUM(FactInternetSales[TaxAmt]) )

Column 2 = NOT([logical2])

Not-function-example2

 


Last Updated : 30 Jan, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads