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.
I’m trying to add a conditional column that says if the value is greater than 0 (and therefore not negative) then add a + sign infront if the value, but if negative don't
at the minute it's just adding a column with + and no value after it?
Does anyone have any ideas how to do this so it includes the value?
Solved! Go to Solution.
Hi @Anonymous ,
Try creating a column as follows:
NewCol = IF([YourColumn] > 0, CONCATENATE("+", [YourColumn]), [YourColumn])
Replace [YourColumn] in above DAX with your actual column from your table.
Thanks,
Pragati
Hi @Anonymous ,
Try this:
newValue =
FORMAT(
[yourValuesColumn],
"+0.0;-0.0;0.0"
)
Pete
Proud to be a Datanaut!
Hi @Anonymous ,
You also could change format of the column rather than create a new column.
+#,#.#;-#,#.#;0
Use custom format strings in Power BI Desktop
Hi @Anonymous ,
You also could change format of the column rather than create a new column.
+#,#.#;-#,#.#;0
Use custom format strings in Power BI Desktop
Hi @Anonymous ,
Try this:
newValue =
FORMAT(
[yourValuesColumn],
"+0.0;-0.0;0.0"
)
Pete
Proud to be a Datanaut!
Hi @Anonymous ,
Try creating a column as follows:
NewCol = IF([YourColumn] > 0, CONCATENATE("+", [YourColumn]), [YourColumn])
Replace [YourColumn] in above DAX with your actual column from your table.
Thanks,
Pragati
@Anonymous
Try
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi @Anonymous
Try Measure like this
Measure =
"+" & SUM( 'Table'[Column1] )
Note, this measure will return text
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 |
---|---|
104 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
142 | |
108 | |
101 | |
81 | |
74 |