March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I want to build a report with the report builder, connected to a PowerBi semantic model.
I realized, that when i try to add a dataset, some of my data values are shown as (Null) values. That happens with all data, when the column name contains [ ] brackets. (see image)
Does anyone know, how I have to change the query, so that the column and its values can be found?
Or is there any other solution that it will work and I can keep the [] brackets in the column name?
Thanks for any hint
Solved! Go to Solution.
Hi, @SCWO
The problem you are experiencing is that when connecting to the Power BI semantic model, the column names contain square brackets ( [ ]), causing (NULL) values to appear in Report Builder, which may be due to the way the Query Designer handles special characters in column names. Here are a few ways to resolve this issue:
Adding Aliases to Columns in a DAX Query
You can add aliases to columns in a DAX query to avoid the use of square brackets. The following is an example of how to add an alias to a column:
EVALUATE
SUMMARIZECOLUMNS(
'fctEnergy'[Datum],
'fctEnergy'[Abriss [0/1]] AS Abriss,
'fctEnergy'[Einspeisung Gasturbine] AS Einspeisung_Gasturbine,
'fctEnergy'[Einspeisung K 07 [kW]] AS Einspeisung_K07_kW
)
If possible, you can rename the columns in Power BI Desktop to remove the square brackets and then publish the updated model. This method ensures that all downstream users and tools that reference these columns do not encounter issues.
In Report Builder, you can create datasets with custom queries and rename columns within them. Here is how to define a query directly in Report Builder:
In Report Builder, go to Dataset Properties.
Select Query Designer and switch to Edit as Text mode.
Write a custom DAX query with aliased column names, similar to the following:
EVALUATE
SUMMARIZECOLUMNS(
'fctEnergy'[Datum],
'fctEnergy'[Abriss [0/1]] AS Abriss,
'fctEnergy'[Einspeisung Gasturbine] AS Einspeisung_Gasturbine,
'fctEnergy'[Einspeisung K 07 [kW]] AS Einspeisung_K07_kW
)
hackcrr
If this post helps, then please consider Accept it as the solution and kudos to this post to help the other members find it more quickly
Note that you can also "fix" this by right clicking on the field and going into Field properties
And they you'll see that the Query Builder has inserted an extra closing square bracket ] - if you remove this the field should start working
Hi, @SCWO
The problem you are experiencing is that when connecting to the Power BI semantic model, the column names contain square brackets ( [ ]), causing (NULL) values to appear in Report Builder, which may be due to the way the Query Designer handles special characters in column names. Here are a few ways to resolve this issue:
Adding Aliases to Columns in a DAX Query
You can add aliases to columns in a DAX query to avoid the use of square brackets. The following is an example of how to add an alias to a column:
EVALUATE
SUMMARIZECOLUMNS(
'fctEnergy'[Datum],
'fctEnergy'[Abriss [0/1]] AS Abriss,
'fctEnergy'[Einspeisung Gasturbine] AS Einspeisung_Gasturbine,
'fctEnergy'[Einspeisung K 07 [kW]] AS Einspeisung_K07_kW
)
If possible, you can rename the columns in Power BI Desktop to remove the square brackets and then publish the updated model. This method ensures that all downstream users and tools that reference these columns do not encounter issues.
In Report Builder, you can create datasets with custom queries and rename columns within them. Here is how to define a query directly in Report Builder:
In Report Builder, go to Dataset Properties.
Select Query Designer and switch to Edit as Text mode.
Write a custom DAX query with aliased column names, similar to the following:
EVALUATE
SUMMARIZECOLUMNS(
'fctEnergy'[Datum],
'fctEnergy'[Abriss [0/1]] AS Abriss,
'fctEnergy'[Einspeisung Gasturbine] AS Einspeisung_Gasturbine,
'fctEnergy'[Einspeisung K 07 [kW]] AS Einspeisung_K07_kW
)
hackcrr
If this post helps, then please consider Accept it as the solution and kudos to this post to help the other members find it more quickly
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
5 | |
4 | |
4 | |
3 | |
2 |