Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

UNION dates not working

Hi all,

 

I have created two tables based on two queries, one has 11 months of data and the rows of each month have that month's date, and the other table just has one date (today)

 

These are the table formulas in DAX:

 

Sector C = groupby('NEU Current Pipeline','NEU Current Pipeline'[Sector],'NEU Current Pipeline'[Pipe CV €M],'NEU Current Pipeline'[Hist Date])
 
Sector H = groupby('NEU History','NEU History'[Sector],'NEU History'[Pipe CV €M],'NEU History'[Hist Date])
 
I need to combine the tables so that I can chart the Pipe CV €M data - but when I use UNION to add the tables together the dates don't work.
 
Sector = UNION('Sector C','Sector H')
 
Individually, the tables look fine, but the combined table seems to have mixed up the columns, as some of the values look like dates (43166 etc) (see the below screen caps)
 
The dates are all formatted the same way an dthe PIpe CV €M is the same data type (decimal), but I'm obviously doing something wrong. Can anyone please help me? Thank you.
 
 
Table 2
 
 
S

1 Reply

  • v-danhe-msft's avatar
    v-danhe-msft
    Microsoft Employee

    Hi Anonymous,

    Based on my test, it could work on my side:

    Table1:

    Table2:

    Union table:

    Due to I could not reproduce your problem, could you please upload your report to your OneDrive or Dropbox and send the link here.

     

    Regards,

    Daniel He