Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have two expression which I am concatenating into one in a Expression tab.
Do we have workaround such that the First expression values are left Aligned and the 2nd Expression values are right aligned? Such that it looks much more cleaner.
Some thing like this:
ProductName
Exp1&' '&Exp2
$20 35%
$5 90%
$1300 180%
right Now it looks
Exp1&' '&Exp2
$20 35%
$5 100%
$100 6%
Note: Both Exp1 and Exp2 are in a same Expression tab and are saperated using &' '&
Thanks a lot for your help.
@seshubabu @ Danielrozental @edwin
Step 1: insert this piece of code in your load statement
len(price) as len_pr,
step 2: create variable
Set vMaxpriceLen = max(len_pr)
step 3: in the chart/table, Use Expression:
= if(len_pr <= vMaxpriceLen,
if(len_pr = 2,
price & Repeat(Chr(160),vMaxpriceLen + 2 - len_pr + 2) & percent,
if(len_pr = 3,
price & Repeat(Chr(160),vMaxpriceLen + 2 - len_pr + 1) & percent,
price & Repeat(Chr(160),vMaxpriceLen + 2 - len_pr) & percent)))
please check attached.
Hi - This may not be an ideal solution but works for your case here.
@Qrishna ,Thanks for your reply.
But I was not able to completely follow your solution.
In the Expression part, are you asking me to do a left Alignment. If yes, I tried but it doesn't work.
Can you please elaborate the solution.
Thanks again for your help.
Step 1: insert this piece of code in your load statement
len(price) as len_pr,
step 2: create variable
Set vMaxpriceLen = max(len_pr)
step 3: in the chart/table, Use Expression:
= if(len_pr <= vMaxpriceLen,
if(len_pr = 2,
price & Repeat(Chr(160),vMaxpriceLen + 2 - len_pr + 2) & percent,
if(len_pr = 3,
price & Repeat(Chr(160),vMaxpriceLen + 2 - len_pr + 1) & percent,
price & Repeat(Chr(160),vMaxpriceLen + 2 - len_pr) & percent)))
please check attached.
@Qrishna , It Worked, Thanks a lot for your help.