Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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 @vi_dataanalyst - 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! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
49 | |
38 | |
37 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |