The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello everyone
Have checked few posts and sources, but still cannot find a solution.
The PowerBI pops up the message "column cannot be found or may not be used in this expression" when I apply change to the table that after change of data source.
I changed the data source from excel files to a SQL database, the data from the database has different column names and order. I have renamed the headers back to the old one (same as the original excel file).
However, it pops up the the message "column cannot be found or may not be used in this expression" when I apply the change. There are mutiple tables and formulas linking to the column names, shouldn't all the existing relationships still be working given I have renamed all the columns already?
I tried to create a visulal just based on the new table (without linking to any other existing tables), the visual looks all good, and I can do calculations based on the new table with the columns within that new table. So it looks the type is defined correctly (I suppose the calculation would fail if I am not defining the columns as something else other than number).
Anyone know what's the issue here? All I did is just changing the data source from excel files to database, but the new columns are all renamed and defined correctly. Not sure why the existing relationships not working. Really appreciate your help!
Thank you!
shouldn't all the existing relationships still be working given I have renamed all the columns already?
Are you sure you did? Column names are case sensitive in Power Query (not in Power BI). The slightest difference will make the relationships, measures, groups and sorts disappear.
You also need to make sure the column types are the same.
In short - swapping data sources is only safe if at the end of the Power Query code the resulting table is EXACTLY in the same format.
Go back to your backup that you took before this, and validate again.