• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Table.ExpandTableCoumn problem

QueryDog

New Member
I ran into a situation in power query as follows:

I have two queries to merge by the columns of "AM" and "Jahr.Monat". The values in the result table will be mixed after
using Table.ExpandTableColumn function. Super easy.

This is the Query "IST":
1740496828264.png

This is the Query "PLAN":
1740496909225.png

After merging them together, seems still to be ok, but after expanding the table the values of Column "Ist Kumm" seem to be wrong or mixed.
The M-code for the merge and expand looks like this:
let
Quelle = Table.NestedJoin(IST2, {"AM", "Jahr.Monat"}, PLAN2, {"AM", "Jahr.Monat"}, "PLAN2", JoinKind.LeftOuter),
#"Erweiterte PLAN2" = Table.ExpandTableColumn(Quelle, "PLAN2", {"PLAN", "PLAN Kumm"}, {"PLAN", "PLAN Kumm"}),
#"Sortierte Zeilen" = Table.Sort(#"Erweiterte PLAN2",{{"AM", Order.Ascending}, {"Jahr.Monat", Order.Ascending}})
in
#"Sortierte Zeilen"

This is the merged query looks like:
1740497212506.png

After the first step (Quelle) are the values still ok, but after expanding the column I get this red marked values, which are false.

Any idea? Can it be a problem of power query?
I would be very glad to get any hints of tips.
Thank you guys.
 
Sorry, this is not a photoshop forum, we can't do anything whit a picture, we need an excel example.
 
Last edited by a moderator:
Sorry, this is not a photoshop forum, we can't do anything whit a picture, we need an excell example.
Second, ask Andreas Felber.
Finden Sie es nicht auch ein bisschen lächerlich, Namen zu verstecken, die man sowieso lesen kann?
Thank you for your reply, I appreciate.
Do you have any substantive comment on the issue too?
 
Hard to comment without the data, I suspect. For starters, your query is joining IST2 and PLAN2 - is that just a typo in your post where you refer to IST and PLAN, or are there actually different queries?
 
Hard to comment without the data, I suspect. For starters, your query is joining IST2 and PLAN2 - is that just a typo in your post where you refer to IST and PLAN, or are there actually different queries?
You’re right, I wrote it wrong. Of course with “2”.
 
The merging query is just like this:
let
Quelle = Table.NestedJoin(IST2, {"AM", "Jahr.Monat"}, PLAN2, {"AM", "Jahr.Monat"}, "PLAN2", JoinKind.LeftOuter),
#"Erweiterte PLAN2" = Table.ExpandTableColumn(Quelle, "PLAN2", {"PLAN", "PLAN Kumm"}, {"PLAN", "PLAN Kumm"}),
#"Sortierte Zeilen" = Table.Sort(#"Erweiterte PLAN2",{{"AM", Order.Ascending}, {"Jahr.Monat", Order.Ascending}})
in
#"Sortierte Zeilen"

In the first step still good values, but after Table.ExpandTableColumn are bad values coming in column "IST Kumm". It might be a software problem, I think I have to rebuild the whole query structure.
Thank you for your time looking at the problem.
 
The merging query is just like this:
let
Quelle = Table.NestedJoin(IST2, {"AM", "Jahr.Monat"}, PLAN2, {"AM", "Jahr.Monat"}, "PLAN2", JoinKind.LeftOuter),
#"Erweiterte PLAN2" = Table.ExpandTableColumn(Quelle, "PLAN2", {"PLAN", "PLAN Kumm"}, {"PLAN", "PLAN Kumm"}),
#"Sortierte Zeilen" = Table.Sort(#"Erweiterte PLAN2",{{"AM", Order.Ascending}, {"Jahr.Monat", Order.Ascending}})
in
#"Sortierte Zeilen"

In the first step still good values, but after Table.ExpandTableColumn are bad values coming in column "IST Kumm". It might be a software problem, I think I have to rebuild the whole query structure.
Thank you for your time looking at the problem.
Check for any null or mismatched data before expanding. Rebuilding the query or adding data type checks could help fix the problem.
 
Back
Top