Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi friends,
I tried but couldn't figure it out, I have this calculation below which i would like to
1. add the "+" sign for positive variance. so made the change (in red) for my formula and it returns error as it couldn't display.
2. be able to condition format the number , Green if it is positive surplus and red if it is negative.
| Entity Name | Operating Suplus CY | Operating Surplus PY |
| FE56bane Gi367BC | 3.3M | 4.1M |
| FE56hampton367BC | -0.1M | 1.4M |
| FE56ich Gir367BC | 1.4M | -0.2M |
| FE56ich Gra367BC | -1.0M | 0.4M |
| FE56oomba G367BC | -1.6M | 0.2M |
| sbanema | 2.0M | 8.3M |
Operating Surplus_CY =
VAR OP_CY =
FORMAT(
CALCULATE(
SUM(Sheet1[Value]),
'End Year'[End Year]
),
"#,##0,.0M")
Return
if(OP_CY > 0, "+"&OP_CY,OP_CY")
Any kind help is much appreciated
Solved! Go to Solution.
Hi, @Anonymous
Please try formula as below:
calculated column:
Operating Surplus_CY =
FORMAT (
CALCULATE ( SUM ( Sheet1[Value] ), 'End Year'[End Year] ),
"+#,##0,.0M;-#,##0,.0M"
)
measure (conditional formatting)
Conditional fomatting =
IF (
[Operating Suplus CY] > 0,
"lightgreen",
[Operating Suplus CY] < 0, "red" )
)
related document:
Best Regards,
Community Support Team _ Eason
Hi, @Anonymous
Please try formula as below:
calculated column:
Operating Surplus_CY =
FORMAT (
CALCULATE ( SUM ( Sheet1[Value] ), 'End Year'[End Year] ),
"+#,##0,.0M;-#,##0,.0M"
)
measure (conditional formatting)
Conditional fomatting =
IF (
[Operating Suplus CY] > 0,
"lightgreen",
[Operating Suplus CY] < 0, "red" )
)
related document:
Best Regards,
Community Support Team _ Eason
@Anonymous , Try like
Operating Surplus_CY =
VAR OP_CY =
CALCULATE(
SUM(Sheet1[Value]),
'End Year'[End Year]
)
var _2 = format(OP_CY,"#,##0,.0M")
Return
if(OP_CY > 0, "+"& _2, _2)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 44 | |
| 40 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 69 | |
| 32 | |
| 32 | |
| 32 |