Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hello. I want to make a minus sign in front of a value in a column that corresponds to a text value in another column. Shown under I want make a "-" sign in front of all the numbers in lots when buy or sell is sell?
Like this:
| Buy | 2 |
| Sell | -1 |
| Sell | -3 |
| Buy | 2 |
| Sell | -1 |
Solved! Go to Solution.
Hi @LFM ,
There are multiple ways to achieve your required output, and one of them is to write a calculate column like below:
Sign = if('Table'[Text]="Sell",'Table'[Lots]*-1,'Table'[Lots])
I attach an example pbix file.
Best regards,
Minus sign in front of a value that corresponds to... - Microsoft Fabric Community
Hi,
You can create a calculated column as below:
ColumnName=
Proud to be a Super User! | |
Hi @LFM ,
There are multiple ways to achieve your required output, and one of them is to write a calculate column like below:
Sign = if('Table'[Text]="Sell",'Table'[Lots]*-1,'Table'[Lots])
I attach an example pbix file.
Best regards,
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 51 | |
| 39 | |
| 29 | |
| 24 |