Forum Discussion
Union Formula mixes columns
Hello together
to improve the download speed from our datawarehouse, i want to split up the data in a historic table (Data from 2013 up to 27th of December) and a current data load table (data from 28th of December onwards). The sql code is the same, only the date changed. Now i wanted to combine these two tables with the union function, but unfortunatly it writes some buying group names from the buying group column in my sales revenue column and converts this column to text instead of number.
Has someone a quick idea how i can avoid this?
Thanks a lot and KR
Florian
just a guess, in your dax union formula, maybe try no to reference the table directly, bu use something like
union (summarize(table_current, field1,field2),summarize(table_history,field1,field2))
26 Replies
- mimAdvocate V
first using the union in the data model instead of append PowerQuery is a very clever idea !! i was think about it when i read about table partition in SSAS
for example
Powerquery 1 load to table 1 - year 2016 - does not change - load only once
PowerQuery 2 load table 2 - year 2017 - do change
then create a calculated table union (table1,table2)
as far as i can see the only reason it is not working, because maybe of a bug
for example see this
- Flori_AbbHelper I
Hello together
thanks a lot for you help and the replies. Unfortunately the problem is not solved, it seems not possible to accelerate the data download by having to identical tables (one with historic) and one with current data.
The DAX Union Formula mixes up some columns - guess that`s a bug and i have no clue how to avoid that. The append query solution is also not working as it always loads both table, even with unchecking "enable load" and "include in report refresh". The only result what i get with unchecking "enabling load" is a mess as it delets all relationships and measures.
So i accept that all as a bug and hope for a solution in the near future.BR
Florian- mimAdvocate V
just a guess, in your dax union formula, maybe try no to reference the table directly, bu use something like
union (summarize(table_current, field1,field2),summarize(table_history,field1,field2))
- RaaassottoHelper I
I have the same issue with mixing columns. It looks like a bug. Union works improperly. My story is absolutely the same as of the author of the topic. Name of the column is the same, order - as well. Data sourse is the same too. Queries are duplicated. The only thing that is changed is period.
- parry2kSuper User
Can you provide screen shot of data sample?
- Flori_AbbHelper I
Hi Parry
sure, but i guess that`s not really helpful. The column structure is the same in both tables. Also it retrieves the correct data from the Server, only after the union formula it writes at the end the KABEG to the Sales_Rev_Quantity.
KR
Florian
- parry2kSuper User
Let me ask it again. You have two queries in PowerBI from same sql server but filtered on different date and then you are using append query in PowerBI Model, is this correct understanding?