I received the error “The exception was raised by IDataReader interface” when I was trying to add a column from a table to one of graphs in Power BI report.
What is the cause of error ?
- Mismatch between the data types of the keys used in relationships.
- Improper date formats of the date fields in relationships.
- (null) values in columns with decimal/whole number data types
How to resolve ?
- Make sure the data types of both the fields in a relationship are same.
- Replace (null) values with 0 for decimal or whole number data types.
- Check your primary keys.
- In the screenshot below the primary key of Table 1 is adding the columns Field 1 (big integer) and Field 2 (big integer) instead of concatenating. (This was really strange considering my query included CONCATENATE)
- Change the data type of your key column.
- Click Edit Queries –> Fetch the column in the table –> Transform
- I changed the data type for Field 1 column from whole number to text.
That Worked !!!
Enjoy Reporting !!!