Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello folks,
I have a condionatal formatting on my report, where if it's negative with the sign "-", it should be green otherqise red.
Negative means good.
I have been told to remove the signs from the values, but keep the colors, but my conditional formating is based on the negative sign.
What can I do 1st: to remove the sign from the values and then add a conditional formatting that give me the same colors?
Thanks!
Solved! Go to Solution.
To achieve the desired outcome of removing the signs from the values while retaining the conditional formatting based on the absence of the negative sign, you can follow these steps:
1. **Remove Signs from Values**:
- In Power BI Desktop, create a new calculated column or measure (depending on where the values are stored) that removes the signs from the values.
- For example, if your original value is stored in a column named "Value", you can create a calculated column like this:
```
Abs_Value = ABS([Value])
```
- This will create a new column (or measure) that contains the absolute values of the original values, effectively removing the negative signs.
2. **Apply Conditional Formatting**:
- Now that you have the absolute values without signs, you can apply conditional formatting based on these values.
- Select the visual (e.g., table or matrix) where you want to apply the conditional formatting.
- Go to the "Format" pane for the visual.
- Find the formatting options for the column or measure where you've removed the signs (e.g., "Abs_Value").
- Apply conditional formatting based on the absolute values:
- Set the color green for values greater than or equal to zero (indicating good).
- Set the color red for values less than zero (indicating negative or bad).
- Save your changes.
By following these steps, you'll remove the signs from the values while still retaining the conditional formatting based on the absence of the negative sign. This way, you'll achieve the desired color representation (green for positive values, red for negative values) without relying on the presence of the negative sign.
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
Hi, @ROG
You can refer to @johnbasha33 reply, if it does not work, you can refer to following method. If you have a similar data structure, you can write a Flag column and then regenerate the required Diff_2 %,with Flag as the background color of Measure
Best Regards,
Yang
Community Support Team
If this does not work, could you please share some sample data without sensitive information and expected output.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
To achieve the desired outcome of removing the signs from the values while retaining the conditional formatting based on the absence of the negative sign, you can follow these steps:
1. **Remove Signs from Values**:
- In Power BI Desktop, create a new calculated column or measure (depending on where the values are stored) that removes the signs from the values.
- For example, if your original value is stored in a column named "Value", you can create a calculated column like this:
```
Abs_Value = ABS([Value])
```
- This will create a new column (or measure) that contains the absolute values of the original values, effectively removing the negative signs.
2. **Apply Conditional Formatting**:
- Now that you have the absolute values without signs, you can apply conditional formatting based on these values.
- Select the visual (e.g., table or matrix) where you want to apply the conditional formatting.
- Go to the "Format" pane for the visual.
- Find the formatting options for the column or measure where you've removed the signs (e.g., "Abs_Value").
- Apply conditional formatting based on the absolute values:
- Set the color green for values greater than or equal to zero (indicating good).
- Set the color red for values less than zero (indicating negative or bad).
- Save your changes.
By following these steps, you'll remove the signs from the values while still retaining the conditional formatting based on the absence of the negative sign. This way, you'll achieve the desired color representation (green for positive values, red for negative values) without relying on the presence of the negative sign.
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
94 | |
82 | |
70 | |
64 |
User | Count |
---|---|
116 | |
106 | |
94 | |
79 | |
72 |