Forum Discussion

RomanMdS's avatar
RomanMdS
Regular Visitor
4 years ago
Solved

Numbers from custom column not usable

I have a custom column which I can't use in views, while I can still use others. It is a custom column on a MSSQL query which is a merged query from a seperate CSV query, i.e. I merged the csv query...
  • BA_Pete's avatar
    BA_Pete
    4 years ago

     

    Ok. So the PBIX you've provided doesn't exactly match the one in the video.

    When I opened the PBIX, I noticed straight away that your [algorithmCalcDuration] field in the Data view was empty, suggesting that this data is not actually leaving Power Query and getting to the data model:

     

    Based on this finding, I looked into the key fields used for the merge, as it appeared as though the merge hadn't actually completed. I found that your text casing between Query2[id] and algorithmExecutionTimes[planningGuid] did not match i.e. [planningGuid] was lower case and [id] was upper case.

    I added a step into algorithmExecutionTimes to make the [planningGuid] upper case:

    = Table.TransformColumns(chgTypes,{{"planningGuid", Text.Upper, type text}})

     

    I was then able to produce this:

     

    Power Query/M code is ENTIRELY case sensitive, both in it's code and the values that it handles. By matching the text cases between the two ID columns, Power Query now recognised them as matching values and was able to complete the merge.

     

    PBIX attached with working output.

     

    Pete