Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello everyone,
I am encountering an issue with my Power BI report where the values of a specific column display correctly in Power Query but show as 0 in Power BI. Here are the details:
I used the following code to create a table that counts the number of columns in each table within my data model:
let
// Get the list of all tables in the data model
Model = #sections[Section1],
TableNames = Record.FieldNames(Model),
// Function to count the number of columns in a table
CountColumns = (TableName) =>
let
TableData = Record.Field(Model, TableName),
ColumnCount = Table.ColumnCount(TableData)
in
ColumnCount,
// Create a list of pairs (Table Name, Number of Columns)
TableData = List.Transform(TableNames, each [Nom_Table = _, Nb_colonnes = CountColumns(_)]),
// Convert the list to a table
ResultTable = Table.FromRecords(TableData)
in
ResultTable
The table contains two columns:
In Power Query, I can see both columns with the correct values. However, when I load the data into power BI, the Nb_colonnes column shows only 0s, except when I include the table itself (the table that provides the count of columns per table). For this specific table, the Nb_colonnes values appear correctly in both Power Query and Power BI.
There are no errors during the data load process, and the data type for Nb_colonnes is correctly set to integer.
I have tried to verify the data types in Power Query (tried with text and number types), refreshed the data multiple times, checked for any potential issues with the source data and permissions.
table on power query:
table on power bi:
Has anyone encountered a similar issue or have any suggestions on how to resolve this?
Thank you in advance for your help!
Hi @Anonymous - Can you try with a blank query, to get generate the table with column details as below
let
Source = financial,
ColumnCount = Table.ColumnCount(financial)
in
ColumnCount
Can you please try the above . still issue exist, share the sample data will check it.
Hope it helps
Proud to be a Super User! | |
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.