Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

CONCATENATE EXCEPT BLANK VALUES

Hello everyone,

 

I have the following code, in which I am creating a new column with the purpose of creating combinations of articles according to the sessionId. However, some of the 'Articles' rows are blank and therefore I would like to include in my code the condition to ignore the empty article rows and only make concatenation when values appear. Could anyone please indicate where should I include this part in my code?

Many thanks!!

 

Combinations of Articles = ADDCOLUMNS(VALUES('Table1'[sessionId]), "Combinations of Articles", CALCULATE(CONCATENATEX(VALUES('Table1'[Articles]),'Table1'[Articles], "&")))
  • Anonymous , Try like

     

    Combinations of Articles = ADDCOLUMNS(VALUES('Table1'[sessionId]), "Combinations of Articles", CALCULATE(CONCATENATEX(VALUES('Table1'[Articles]),'Table1'[Articles], "&"), filter('TABLE1', not(isblank('Table1'[Articles])))))

2 Replies

  • Anonymous , Try like

     

    Combinations of Articles = ADDCOLUMNS(VALUES('Table1'[sessionId]), "Combinations of Articles", CALCULATE(CONCATENATEX(VALUES('Table1'[Articles]),'Table1'[Articles], "&"), filter('TABLE1', not(isblank('Table1'[Articles])))))

  • Anonymous's avatar
    Anonymous
    Not applicable

    thank you!!!