Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Circumwent a circular dependency

Hi people, 

 

I want to create a column where every value just appears one time. 

DISTINCT will create a circular dependency.

 

 

 

CONCATENATEX(DISTINCT(FILTER('BaseData','BaseData'[OrderNumber]=EARLIER('BaseData'[OrderNumber]))),'BaseData'[Team]," ")

 

 

A sample file is here: sample.pbix 

 

I want that every value in the "s_t column" just appears one time.

 

For example in the first row: there should be just one "A" in the s_t column.

or in the row where the "UnderOrderNumber" is "4", the row in the s_t colum should be "B C D"

 

Thanks in advance for any help!

  • Hi Anonymous ,

     

    You may create  a calculated table first of all, then create a calculated column  [s_t column] in 'Table2' like DAX below.

     

     

    Table:
    
    Table2 = SUMMARIZE(BaseData,BaseData[OrderNumber],BaseData[team], "C_UnderOrderNumber", COUNT(BaseData[OrderNumber] ))
    
    
    
    Column:
    
    s_t column = CONCATENATEX(FILTER(Table2,Table2[OrderNumber]=EARLIER(Table2[OrderNumber])),[team]," ")

     

    Best Regards,

    Amy 

     

    Community Support Team _ Amy

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • v-xicai's avatar
    v-xicai
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    You may create  a calculated table first of all, then create a calculated column  [s_t column] in 'Table2' like DAX below.

     

     

    Table:
    
    Table2 = SUMMARIZE(BaseData,BaseData[OrderNumber],BaseData[team], "C_UnderOrderNumber", COUNT(BaseData[OrderNumber] ))
    
    
    
    Column:
    
    s_t column = CONCATENATEX(FILTER(Table2,Table2[OrderNumber]=EARLIER(Table2[OrderNumber])),[team]," ")

     

    Best Regards,

    Amy 

     

    Community Support Team _ Amy

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.