1 year ago
#184026
SQALEX101
Is there a way to justify text in a PBI DAX measure?
I have a text box in PBI whose title is set to a measure value as shown below:
dense test =
var seperator = "|"
var a = "some set of value:"
var a1 = 1100
var a2 = 240000
var b = "some other set of value:"
var b1 = 2300
var b2 = 15000
var alltogether =
a & a1 & seperator & a2 & UNICHAR(10) &
b & b1 & seperator & b2
RETURN alltogether
word wrap is off title is set to a function -> the measure value alignment = left
what I'm struggling with is I cannot get the pipe seperator to align I've tried padding with REPT() function but it seems as though the textbox decides arbitrarily how much space to add after each variable.
dense test rept =
var seperator = "|"
var a = "some set of value:"
var a1 = 1100
var a2 = 240000
var b = "some other set of value:"
var b1 = 2300
var b2 = 15000
var alltogether =
a & REPT(UNICHAR(127),25 - LEN(a)) & a1 & seperator & a2 & UNICHAR(10) &
b & REPT(UNICHAR(127),25 - LEN(b)) & b1 & seperator & b2
RETURN alltogether
Results below:
text
powerbi
dax
whitespace
justify
0 Answers
Your Answer