Forum Discussion

bipro-atlanta's avatar
bipro-atlanta
Frequent Visitor
7 years ago
Solved

Add commas to a text numeric value

My Dax Concatenates values , but their are some blank values however it adds comma in front when i try to concatenate and try to remove

 

IF(HASONEVALUE('MyTable'[TableID]),(CONCATENATEX(
VALUES('MyTable'[MissingDateList]),'MyTable'[MissingDateList] ,",",'MyTable'[MissingDatelist], ASC)))

 

,10/1 
,10/2,10/5 
,10/2,10/3,10/4,10/5

 

the values should be  instead .. i am missing something and not sure what ..

 

10/1 
10/2,10/5 
  
  
10/2,10/3,10/4,10/5
  • would filtering the blanks do the job?

    Measure = 
    IF(
        HASONEVALUE('MyTable'[TableID]),
        CONCATENATEX(
            FILTER(VALUES('MyTable'[MissingDateList]),'MyTable'[MissingDateList]<>BLANK()),
            'MyTable'[MissingDateList] ,
            ",",
            'MyTable'[MissingDatelist], 
            ASC
            )
        )

1 Reply

  • Stachu's avatar
    Stachu
    Community Champion

    would filtering the blanks do the job?

    Measure = 
    IF(
        HASONEVALUE('MyTable'[TableID]),
        CONCATENATEX(
            FILTER(VALUES('MyTable'[MissingDateList]),'MyTable'[MissingDateList]<>BLANK()),
            'MyTable'[MissingDateList] ,
            ",",
            'MyTable'[MissingDatelist], 
            ASC
            )
        )