The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
hello
My first table has the following fields in that order
employeeid, fullname, managerid, managername, herachypath, hierachydepth, level1, level2, level3, ..., allLevelSort, isleaf
while the second table has the same field but they are alphabetically sort.
When I want to create a new table allManagers=union('dim manager Level 1' ,'dim manager level2 ') it gives stange things.
Does someone know how to solve this isssue.
Solved! Go to Solution.
Hi @Anonymous,
For Dax formulas, current you can only use 'SELECTCOLUMNS', 'SUMMARIZE', 'GROUPBY' functions to choose columns and define the order of the columns in variable tables and merge them with union functions.
Table = UNION(GROUPBY(T1,[1],[2],[3],[4],[5]),GROUPBY(T2,[1],[2],[3],[4],[5]))
In addition, you can also do merge table operation in query edit, it allows you to change the order of columns.
let
Source = Table.Combine({@T1,Table.ReorderColumns(@T2,Table.ColumnNames(@T1))})
in
Source
Regards,
Xiaoxin Sheng
if in the second table the order is not exactly the same as in dim manager level1, for ex:
Hi @Anonymous,
For Dax formulas, current you can only use 'SELECTCOLUMNS', 'SUMMARIZE', 'GROUPBY' functions to choose columns and define the order of the columns in variable tables and merge them with union functions.
Table = UNION(GROUPBY(T1,[1],[2],[3],[4],[5]),GROUPBY(T2,[1],[2],[3],[4],[5]))
In addition, you can also do merge table operation in query edit, it allows you to change the order of columns.
let
Source = Table.Combine({@T1,Table.ReorderColumns(@T2,Table.ColumnNames(@T1))})
in
Source
Regards,
Xiaoxin Sheng
User | Count |
---|---|
77 | |
77 | |
36 | |
30 | |
28 |
User | Count |
---|---|
106 | |
97 | |
55 | |
49 | |
46 |