Forum Discussion

refint650's avatar
refint650
Helper III
4 years ago
Solved

Remove duplicates from union

Hello 

 

I'm doing custom table with select columns in dax calculations and when creating relationship sales, products , order gives me many-many options , so how can i check and remove duplicates from custom table. so relationship will many to one between fact & custom dim.

 

Table = 

Var _Sales = selectcolumns(Actuals,"ID", ]Activity_Id],"Name", ]Activity_Name])

Var _Products = selectcolumns(Actuals,"ID", ]Activity_Id],"Name", ]Activity_Name])

Var _Orders = selectcolumns(Actuals,"ID", ]Activity_Id],"Name", ]Activity_Name])

Var _Vunion = distinct (union( _Sales, _Products,_Orders)

return  _Vunion 

thanks

vs

 

 

 

  • Hi, refint650 

     

    I have created some new data and the attempt with your formula was successful. What other problems did you encounter? Is it convenient to provide some of the example data? Sensitive data can be removed in advance.

     

    Best Regards,

    Community Support Team _Charlotte

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

2 Replies