Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
hi,
I need to use DAX calculate column function to remove the dupplicate value:
| Input | Expected Output |
| A, A, B | A, B |
| B, B, C | B, C |
how to do this?
thanks
Solved! Go to Solution.
Hey @Iamnvt ,
in Power Pivot you are able to use the CALENDAR function as is described here:
https://www.sqlbi.com/articles/generating-a-series-of-numbers-in-dax/
Here is the DAX statement from above now using the function CALENDAR:
output calendar =
var _in = 'Table'[input]
var _inAsPath = SUBSTITUTE(_in , ", " , "|")
var _inPathLength = PATHLENGTH(_inAsPath)
var _T = DISTINCT(SELECTCOLUMNS(ADDCOLUMNS(SELECTCOLUMNS(CALENDAR(1 , _inPathLength), "_Value", INT(''[Date])), "@item", PATHITEM(_inAsPath , [_Value] , TEXT)) , "@@item", [@item]))
return
CONCATENATEX(_T , [@@item], ", ")
Regards,
Tom
Hey @Iamnvt ,
you can use this DAX to create a calculated column:
output =
var _in = 'Table'[input]
var _inAsPath = SUBSTITUTE(_in , ", " , "|")
var _inPathLength = PATHLENGTH(_inAsPath)
var _T = CONCATENATEX(DISTINCT(SELECTCOLUMNS(ADDCOLUMNS(GENERATESERIES(1 , _inPathLength) , "@PathItem" , PATHITEM(_inAsPath , [Value] , TEXT)) , "@@pahItme" , [@PathItem])), [@@pahItme] , ", ")
return
_T
This is how it looks like:
@TomMartens thanks for the answer
DAX in Power Pivot doesn't have GENERATESERIES function.
is there any other way around?
Hey @Iamnvt ,
in Power Pivot you are able to use the CALENDAR function as is described here:
https://www.sqlbi.com/articles/generating-a-series-of-numbers-in-dax/
Here is the DAX statement from above now using the function CALENDAR:
output calendar =
var _in = 'Table'[input]
var _inAsPath = SUBSTITUTE(_in , ", " , "|")
var _inPathLength = PATHLENGTH(_inAsPath)
var _T = DISTINCT(SELECTCOLUMNS(ADDCOLUMNS(SELECTCOLUMNS(CALENDAR(1 , _inPathLength), "_Value", INT(''[Date])), "@item", PATHITEM(_inAsPath , [_Value] , TEXT)) , "@@item", [@item]))
return
CONCATENATEX(_T , [@@item], ", ")
Regards,
Tom
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 51 | |
| 46 | |
| 23 | |
| 19 |
| User | Count |
|---|---|
| 138 | |
| 111 | |
| 50 | |
| 33 | |
| 29 |