Forum Discussion
Chitemerere
Responsive Resident
6 years agoNew table creation with UNION
I am trying to create a new table using UNION based on an exisiting table called 'PharmaAuditGW" as follows:
Original table called PharmaAuditGW
PharmaAuditGW with Others = UNION(
ROW("ProductCode_wOthers", 99, "Item_wOthers", "Others"),
ALLNOBLANKROW('PharmaAuditGW'[ProductCode], 'PharmaAuditGW'[Item])
)
However the results are reversed as can be seen below:
The column headers are exchanged together with the values of the newly created row.
Kindly assist,
Chris
6 Replies
- az38
Community Champion
Hi Chitemerere
try to use the same column names and order, like
PharmaAuditGW with Others = UNION( ROW("ProductCode", 99, "Item", "Others"), ALLNOBLANKROW('PharmaAuditGW'[ProductCode], 'PharmaAuditGW'[Item]) )- Chitemerere
Responsive Resident
Thank you very much for your response, most appreciated. The results are as follows:
The problem still exists.
Regards,
Chris
- amitchandak
Super User
Try it once like this and see if it works
PharmaAuditGW with others - UNION(
ROW("ProductCode_wOthers", 99, "Item_wOthers", "Other"),
summary('PharmaAuditGW','PharmaAuditGW'[ProductCode], 'PharmaAuditGW'[Item])
)you can filter from white in summary
- Chitemerere
Responsive Resident
Thank you very much for your input, the solution did not work, see below:
Best regards,
Chris