What is the Power BI Sign function?
The Power BI Sign is a Math and Trig function that determines the signage of a number or the results of a calculation or a value in a column. You can use this function specifically to identify whether the calculated output is positive or negative.
Table of contents
Key Takeaways
- The Power BI Sign helps you determine the signage of a number or the results of a calculation or a value in a column.
- It accepts only a single parameter that must be a numeric value.
- You can use the IF or SWITCH function as an alternative to the SIGN function in Power BI.
- You can nest the SIGN function within other functions such as IF to perform any derived logic for your reporting purposes.
- You must handle the null values separately as the Power BI Sign function doesn’t handle these null values specifically.
Syntax
The syntax for the Power BI Sign function is provided below:
SIGN(<number>)

This function accepts only 1 input parameter that includes:
- number: It can be any real number or a column containing a number or an expression that’s evaluated to a number.
The Power BI Sign function returns a whole number that can have 3 possible values. They are
- 1 – If the number is positive i.e. > 0
- 0 – if the number is 0
- -1 – If the number is negative i.e. < 0
In the next section, we will see how you can use the Power BI Sign function with a step-by-step instructions guide.
How to use the Power BI Sign function?
To use Power BI Sign, follow the step-by-step instructions outlined below:
Step 1: Launch the Power BI Desktop on your system.
Step 2: On the Home tab, use the Get data option to choose the dataset. Import the dataset using the system navigator and load it into Power BI by clicking on the Load button.

Step 3: Navigate to the Modeling tab and click on the New column option.

Step 4: In the formula bar prompt, specify the logic for the calculated column by using the DAX expression involving the Power BI Sign function. Once the changes are done, click on the Commit icon on the Power BI Desktop to save your changes.
ProfitSignage = SIGN(financials[Profit])

Step 5: Navigate to the Visualizations pane to select a visual icon. Drag and drop the field attributes, including the newly created column, to the visual properties.

Examples
In this section, we will demonstrate different examples where you can use the Power BI Sign function for your reporting purposes.
Example #1
In this example, we will demonstrate a straightforward case of how you can use the Power BI SIGN function to determine the signage of a data field. To demonstrate this example, we will create a table manually in Power BI. The manual table will have two columns, i.e., Country and GDP Growth %, with some sample values.
To determine the signage using the Power BI SIGN function, follow the steps outlined below:
Step 1: Navigate to the Home tab in Power BI Desktop. Click on the new table icon.

It will open a Create table screen on your Power BI Desktop.
Step 2: In the Create Table screen, click on the + icon next to Column1 to insert additional columns.

Step 3: Double-click on Column1 to provide a meaningful name to the column. Repeat the same step for Column2 as well.

Step 4: Provide the values in the cells for each column as shown below. Provide a meaningful name to the Table. Click on the Load button to load the data into Power BI.

Step 5: Navigate to the Table view to view the newly created table along with values.

Step 6: Navigate to the Data pane. Right-click on the table and choose the New column from the context menu.

Step 7: In the formula bar prompt, specify the DAX expression using the SIGN function.
Here we have created a calculated column GDP Growth Signage based on the GDP Growth column using the SIGN function.
GDP Growth Signage = SIGN(‘Country GDP Growth'[GDP Growth])

Click on the Commit icon to save the changes for your column.
Step 8: Navigate to the Visualizations pane and choose the Clustered column chart visual. Drag and drop the fields from the Data pane to the X-axis, Y-axis, and Legend sections of the visual.

Once the mapping is completed, you will see your visual in the report canvas, as shown below.

As you can see, the positive GDP growth is highlighted in red, whereas the negative ones are in blue.
Example #2
In this example, we will demonstrate the usage of the SIGN function in Power BI to identify whether a Global 500 company is profitable or not. To demonstrate this, we have used the Global 500 companies dataset. The Global 500 companies contain Global 500 Companies Statistics, Sales, Profit, Assets, and Market Value.
We have outlined the step-by-step instructions on how to determine the signage using the Power BI SIGN function.
Step 1: In the Power BI Home tab, click on the Get data. Use the navigator to select your datasets. Click on the Load button to load the data into the Power BI.

Step 2: Navigate to the Modeling tab and choose the New column option.

Step 3: In the formula bar prompt, write the DAX expression specifying the Power BI SIGN function to create a calculated column.
In this case, we are using the nested SIGN function in conjunction with the IF statement. The Profit or Loss calculated column is created to determine whether a company is profitable or not based on the profit values. If signage is positive i.e. > 0 then Profit. If the signage is negative then Loss. For 0 value, it will assign No Profit/Loss.
Profit or Loss = IF(SIGN(‘Global-500-Companies'[Profit $])>0,”Profit”,IF(SIGN(‘Global-500-Companies'[Profit $])<0,”Loss”,”No Profit/Loss”))

Hit on Enter to save your DAX expression changes for the measure.
Step 4: Navigate to the Visualizations pane. Select the Donut chart visual icon from the available list of options. Map the data fields from the Data pane to the Legend and Values section of the visual.

Here we have created two donut charts for our reporting purposes.
- Total Assets of companies by profit or loss.
- Total market value by country and profit or loss for top 10 companies
For the 2nd donut chart, we have applied a filter using the Rank column, as shown below.
Post the changes to your visuals; you should be able to view the report in the Power BI report canvas, as shown below.

Post the changes to your visuals, you should be able to view the report in Power BI report canvas as shown below

Example #3
In this example, we will demo applying conditional formatting to a Power BI visual using the SIGN function. To demo this example, we have used the Salesstore-Product-Details dataset. The Salesstore-Product-Details dataset contains various details of products sold at a store such as Order, Sales, shipping mode, quantity, profit, etc.
To apply conditional formatting to Power BI visual using the Power BI SIGN function, follow the instructions outlined below:
Step 1: Navigate to the Power BI Home – Get data. On the navigator screen under Display Options, select the dataset. Click on the Load button to import the dataset to the Power BI data model.

Step 2: Navigate to the Modeling tab and click on the New column option.

Step 3: To create the calculated column, write the DAX expression using the Power BI SIGN function In the formula bar prompt.
Profit_Signage_Indicator = SIGN(‘Salesstore-Product-Details'[Profit])

Save the changes by clicking on the Commit button.
Step 4: Navigate to the Visualizations pane. Choose the Table visual icon from the list. Map the Columns section with the data fields from the Data pane.
As you can see here, we have mapped Region, Product_category, and Profit data fields to the Columns section of the Table visual.

Step 5: Click on the down arrow next to the Sum of Profit data field in the Columns section. Click on Conditional formatting – Font color.

It will open a Font color window in Power BI.
Step 6: In the Font color window, specify the details such as Format style; what field should we base this on? And the color gradients for minimum, maximum, etc. We have also defined a middle color for this visual.
Note this color gradient is based on the new column profit_signage_indicator that we have created.
Click on OK to save the changes.
Now, you shall be able to view the different font colors as per the calculated column we have created using the SIGN function in Power BI.

Click on OK to save the changes.
Now you shall be able to view the different font colors as per the calculated column we have created using the SIGN function in Power BI.

Note that the Profit values are sorted as per the values highlighted in different colors.
Important Things to Note
- The Power BI SIGN function requires numeric values to function accurately. You can use data types such as Date for the SIGN function as well. For non-numeric data, this function returns an error.
- It returns a blank value if the input parameter has blank values.
- SIGN does not work with infinite numbers.
Frequently Asked Questions (FAQs)
As an alternative to the SIGN function in Power BI, you may consider using logical functions such as IF or SWITCH to achieve similar results.
No, the SIGN function in Power BI does not handle NULL values natively. You need to ensure that any null values are separately addressed before you use the SIGN function.
Yes, you can nest the SIGN function within other functions in Power BI to perform complex and logical calculations.
Yes, you can use the SIGN function in both calculated columns and measures in Power BI. You can use both calculated columns and measures to include any data transformation logic or apply custom calculations for your reporting requirements.
Recommended Articles
Guide to Power BI Sign. Here we explain its syntax, how to use sign function to determine the signage of a data field, with examples & points to remember. You can learn more from the following articles –
Leave a Reply