Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
brendo
Helper I
Helper I

data format error but the value returning the error doesn't exist?

Hi -- I can't share the data I am using because it is not public information. However I will do my best to explain the issue. 

 

I have a dataset that I am performing several operations on. All steps are successful until I pivot a column. Then I get a data format error that the value "mr2021" could not be turned into a date. The issue is, this value doesn't appear to exist in my dataset. To try to find the value, I queried my dataset until the step where I pivot the data and the query fails, and I exported this data to R. The value "mr2021" doesn't exist in my data. Also, the key-value columns that I'm pivoting only contain text values. I still get this error that the value "mr2021" cannot be turned into a date. I've also tried converting all my columns to text before pivoting but for some reason during the pivot step power query still finds this "mr2021" value and tries to convert it to a date...

 

In my dataset, I only have two columns with date values. And in previous steps I replaced all errors in those columns with null values. So it doesn't seem like this error is coming from my date columns.

 

I'm truly stumped as to what to do. Does anyone have experience dealing with a similar situation?

1 REPLY 1
samdthompson
Memorable Member
Memorable Member

Hello, bit hard to tell without seeing but the two steps id take would be:

 

1. Make sure that on pivot the Advanced options >>> Aggregate Value Function is set to Don't aggregate

2. Create a step immediately prior that generates an index column which you delete in the subsequent step. An alternate here is to Table.Buffer() but i prefer the UI index method. PQ can be a bit odd with where it takes data from and the inserting an index forces it to readt from the previous step.

 

Let me know how you go.

 

Cheers,

 

 

// if this is a solution please mark as such. Kudos always appreciated.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors