Forum Discussion

Stolliver's avatar
Stolliver
Frequent Visitor
2 years ago

Unpivoting columns turns all data into error

Hello Everyone,

 

So, I have this set of data and I replaced all values of No with null and then I went to unpivot the selected columns and it turns everything into an error. Here's what it looks like before:

And after:

Anyone have any ideas why it's doing this?

 

3 Replies

  • TheoC's avatar
    TheoC
    Icon for Community Champion rankCommunity Champion

    Hi Stolliver 

     

    From what I can see, you are attempting to unpivot data that does not have an ID to use as a basis of unpivoting.  The Asset ID column is null.

     

    Can you try to add a new Index column starting from 1, then try to unpivot accordingly?

     

    Hope this helps!


    Theo

     

  • Stolliver's avatar
    Stolliver
    Frequent Visitor

    What do you mean by add a new index column? I have one labeled ID which starts at 1 and goes to 4. I tried selecting that one in the unpivot area, but it still resulted in an error.

    • TheoC's avatar
      TheoC
      Icon for Community Champion rankCommunity Champion

      Stolliver the only information that has been provided thus far in reference to your data is what you've provided in the post.  I wasn't aware from the screenshot that you provided that an Index column existed given the ComplianceAssetId says "null" across all four rows.  

       

       

      Can I suggest replacing the "null" values in your dataset and reattempting.