Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Unable to Perform UNION or Append

I got  table1 with list of compliant/non-compliant countries - I added 'Device Category' = All , column to it 
table1 is filtering correctly with Slicers like Compliant(yes/no) , Year, Region, Country

Now I imported 3 new tables with exact same columns like table1 but with different 'Device Categories'

table2 - Device Category = value2
table3 - Device Category = value3

table4 - Device Category = value4

Slicers are not working on new 3 tables


I tried Appending Table1 with table2, table3, table 4 - IT GAVE  ERROR FOR DUPLICATE COUNTRY IN COUNTRY COLUMN

 

I tried DAX UNION function - IT GAVE ERROR - The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

 

I havee exact 3 columns in these 4 tables

 

How can I solve this , please help , its critical

2 Replies

  • jaweher899's avatar
    jaweher899
    Icon for Impactful Individual rankImpactful Individual

    To solve this issue, you can try the following steps:

    1. Remove duplicates from each table: You can use the DAX function "Remove Duplicates" to remove any duplicates in each table. This way, you can ensure that there are no duplicate country entries.

    2. Create a new column in each table to differentiate between the tables: You can add a new column to each table that represents the "Device Category" and populate it with the corresponding values. This way, you will be able to differentiate between the data in each table and make sure that the slicers are working correctly.

    3. Create a master table by combining all the data: After removing duplicates and adding a new column to differentiate between the tables, you can combine all the data from each table into a master table using DAX functions like "UNION" or "APPEND". This way, you will have all the data in one table and the slicers will work correctly.

    4. Create a calculated column in the master table to control the slicer behavior: To control the behavior of the slicers on the master table, you can create a calculated column that uses the data from the "Device Category" column. You can use this calculated column as the basis for your slicers.

    This way, you can ensure that the slicers are working correctly for all the data in the master table.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Appriciate your help, our team decided to go with new structure