Forum Discussion
DAX Ideas
Hello Experts,
There's a column with value "apple","ball".
But i want to return the calculated column with values like : "apple ", "ball "
Thanks & Regards....
- Anonymous2 years ago
BIswajit_Das If I understand correctly, just use CONCATENATE and put as many spaces you need in the second text argument:
Finally found a way :
In order to append extra spaces according to our requirement
we can use the following DAX mentioned below
i.e
RESPONSE_C =VAR currentValue = 'table'[column]VAR currentLength =LEN ( CONVERT ( currentValue, STRING ) )VAR extraSpaces = 10 - currentLength // change 10 according to our requirement.VAR prefix =REPT ( UNICHAR ( 0160 ), extraSpaces )RETURN"" & prefix & ""& currentValue
5 Replies
- HotChilliCommunity Champion
- AnonymousNot applicable
BIswajit_Das If I understand correctly, just use CONCATENATE and put as many spaces you need in the second text argument:
- BIswajit_DasImpactful Individual
I've got it it's in the matrix column header setting
We've have to disable Text wrap and enable Auto-size width
in-order to acheive my requirement.
Thanks you...
- BIswajit_DasImpactful Individual
Anonymous Thanks for responding but it's not working
If you check it using a matrix you'll see that the spaces are ignored.
- BIswajit_DasImpactful Individual
Finally found a way :
In order to append extra spaces according to our requirement
we can use the following DAX mentioned below
i.e
RESPONSE_C =VAR currentValue = 'table'[column]VAR currentLength =LEN ( CONVERT ( currentValue, STRING ) )VAR extraSpaces = 10 - currentLength // change 10 according to our requirement.VAR prefix =REPT ( UNICHAR ( 0160 ), extraSpaces )RETURN"" & prefix & ""& currentValue