Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

SVG Dax not working

I have written this dax in order to get arrows up and down and horizontal depending on condions, but it's not working:

 

M6a_ =
Switch(
True(),
([KPI_6a] > [LM 6a]),
"data:image/svg+xml;utf8,
<svg xmlns='svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25"><path style="fill:#232326" d="m18.294 16.793-5.293 5.293V1h-1v21.086l-5.295-5.294-.707.707L12.501 24l6.5-6.5-.707-.707z'/></svg>",
([KPI_6a] < [LM 6a]),
<svg data-name="1-Arrow Up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="m26.71 10.29-10-10a1 1 0 0 0-1.41 0l-10 10 1.41 1.41L15 3.41V32h2V3.41l8.29 8.29z"/></svg>

<svg data-name="1-Arrow Up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="m26.71 10.29-10-10a1 1 0 0 0-1.41 0l-10 10 1.41 1.41L15 3.41V32h2V3.41l8.29 8.29z"/></svg>,
"data&colon;image/svg+xml;utf8,
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m21.706 12.708-3 3a1 1 0 0 1-1.414-1.414L18.586 13H5.414l1.293 1.293a1 1 0 1 1-1.414 1.414l-3-3a1 1 0 0 1 0-1.416l3-3a1 1 0 0 1 1.414 1.416L5.414 11h13.172l-1.293-1.293a1 1 0 0 1 1.414-1.414l3 3a1 1 0 0 1-.001 1.415z" style="fill:#1c1b1e" data-name="Expand Direction"/></svg>"
)
 

 

4 Replies