Hello, Im trying to concatenate 6 values into a virutal column that works as a summarization column in a table view and I need those values separated by a separator of some kind. Ive used as separator " " since I wanted the space but, if the values of the columns concatenated are empty then the virtual column is not blank but made of " " (5 spaces). Is there a way to concatenate those values without having to force a separator?
Solved! Go to Solution.
Try this:
SUBSTITUTE(
CONCATENATE(
LIST(
[Invio dati],
[Pulizia canali],
[Canali],
[Batteria],
[Minimo notturno],
[Idrovalvola],
[Note]
)
- LIST(" ", "")
),
" , ",
" "
)
Tried this workaround:
IF(ISBLANK([Invio dati]),"",[Invio dati]) &
IF(ISBLANK([Pulizia canali]),""," "&[Pulizia canali])&
IF(ISBLANK([Canali]),""," "&[Canali])&
IF(ISBLANK([Batteria]),""," "&[Batteria])&
IF(ISBLANK([Minimo notturno]),""," "&[Minimo notturno])&
IF(ISBLANK([Idrovalvola]),""," "&[Idrovalvola])&
IF(ISBLANK([Note]),""," "&[Note])
This way If something is to be concatenated the separator is coming from the IF() espression and not from the concatenation itself. If theres nothing to be concatenated nothing would be added so no invisible spaces that might make the virtual column NOTBLANK().
Now, how could I make it better looking and a bit more refined? I was thinking about using List() and SPLIT() but Ive never used those expressions.
Try this:
SUBSTITUTE(
CONCATENATE(
LIST(
[Invio dati],
[Pulizia canali],
[Canali],
[Batteria],
[Minimo notturno],
[Idrovalvola],
[Note]
)
- LIST(" ", "")
),
" , ",
" "
)
Need to try that, and also need to read about Substitute() and how List() works
Tried this and It works. I still dont get how that subtraction works:
LIST(" ", "")
and also what this part does:
" , ", " "
after that works. Need to study more I guess.
Thanks for the help!
Thank you! Grazie
Ciao @Gianlucapozza
Could you please share the formula you are using and a screenshot of the virtual column configuration?
Ok scusa
you have done that while i was writing
IF(ISBLANK([Invio dati]),"",[Invio dati]) & IF(ISBLANK([Pulizia canali]),""," "&[Pulizia canali])&IF(ISBLANK([Canali]),""," "&[Canali])&IF(ISBLANK([Batteria]),""," "&[Batteria])&IF(ISBLANK([Minimo notturno]),""," "&[Minimo notturno])&IF(ISBLANK([Idrovalvola]),""," "&[Idrovalvola])&IF(ISBLANK([Note]),""," "&[Note])
First suggestion, if you want to concatenate you should have a look at
Have you tried a formula by using this expression?
Yes, it was my first try, problemi is I dont want the separator to be imposed by the CONCATENATE() expression because If I happen to have blank values to be concatenated the separator is still showed. Could use concatenate() instead of & in formula though.
it shows the separators according to what your formula says... Share your previous formula if you like, and some examples of texts that show the problem of these separators
User | Count |
---|---|
16 | |
10 | |
8 | |
5 | |
5 |