Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi guys,
I have 2 tables, in one i have Projects and in the other i have tasks.
I would lilke to create a new table with 2 columns, in the first i want to have a union of distinct Names (Project Name and Taks Name), in the second i want an indication from which table the column is come from so the values will be like this (Project, Task).
For the first Column i figured out how to create it (look the code below)
Solved! Go to Solution.
Hi,
Thank you for your feedback.
Please check the below DAX formula whether it suits your requirement.
Additionally, if you want to change a column name, you can try to use SELECTCOLUMNS DAX function as well.
New table =
SELECTCOLUMNS (
UNION (
ADDCOLUMNS ( DISTINCT ( Projects[Project name] ), "Table name", "Project" ),
ADDCOLUMNS ( DISTINCT ( Tasks[Task name] ), "Table name", "Task" )
),
"@Name", Projects[Project name],
"@Table", [Table name]
)
Hi,
Please check the below picture and the attached pbix file.
New table =
UNION (
ADDCOLUMNS ( Projects, "Table name", "Project" ),
ADDCOLUMNS ( Tasks, "Table name", "Task" )
)
@Jihwan_Kim Hmm yes since i have multiple columns in the table how can i select only the ProjectName from Projects table and only the TaskName from Tasks table instead of all the table?
Hi,
Thank you for your feedback.
Please check the below DAX formula whether it suits your requirement.
Additionally, if you want to change a column name, you can try to use SELECTCOLUMNS DAX function as well.
New table =
SELECTCOLUMNS (
UNION (
ADDCOLUMNS ( DISTINCT ( Projects[Project name] ), "Table name", "Project" ),
ADDCOLUMNS ( DISTINCT ( Tasks[Task name] ), "Table name", "Task" )
),
"@Name", Projects[Project name],
"@Table", [Table name]
)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 31 | |
| 25 |