Skip to content

Commit 8bb1f4d

Browse files
authored
Update Conditional-Colors-Dax-CheatSheet.md
1 parent 6d6f7bc commit 8bb1f4d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

source-dax/Conditional-Colors-Dax-CheatSheet.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
## Making Text Foreground Color fully transparent for 0
2+
3+
Do you want text to be fully transparent when the value is 0?
4+
You can use **8-digit** hex codes or `hsla()` or `rgba()` functions to make it transparent.
5+
6+
7+
```ts
8+
[ FontTransparentColor ] =
9+
var curValue = SELECTEDVALUE( Nums[Value], 0 )
10+
var finalColor = If(
11+
curValue = 0,
12+
"#ff00ff00", // or: "hsla(300, 100%, 50%, 0)"
13+
"#ff00ff99"
14+
)
15+
return finalColor
16+
```
17+
118
## Conditional format using a gradient
219
```ts
320
[ HSL Hue from Sales ] =

0 commit comments

Comments
 (0)