Forum Discussion

bgreiner's avatar
bgreiner
Frequent Visitor
2 years ago

Dataset in Report Builder returns NULL for values in certain fields

Hello. I have built a query for a dataset in Power BI Report Builder that is pointing at a semantic model in my organization's workspace. I built the query using the desktop program's query editor. It is returning NULL values for a few fields (not all fields) in a table, even though the fields do contain text. I made a paginated report on the online service (clicky-clicky-draggy-draggy method, as Guys in a Cube would say) that is based on the same semantic model, and no such NULL values appear. I have tried to download the .rdl of the report that is working, then import the dataset query into my other report, but it still returns NULL values once it is evaluated in my report. 

 

My main questions:

1. Is there another way to move dataset definitions between .rdl files, other than the "Import" button? For example, can I directly copy the .xml code somehow? I found an old forum post that suggested this method, but it seems like it is no longer possible in the latest Report Builder. Should I just do this in Notepad or similar? My other idea was "report parts" but it seems those have been phased out too. 

 

2. Any ideas why my query built on desktop is failing to return values, while the one built in the service is fine? My main clue is that these fields include special characters (the values are text written in Spanish). Or maybe that the field titles include bracket symbols (this is how we distinguish between fields containing English vs. Spanish versions of the same information... e.g. one troublesome field is called "Definition [ESP]" in the semantic model. ). If I can't solve this, I guess I can create every .rdl on the online service first, then modify it on the desktop, but I can imagine many scenarios down the road where this will be problematic. Seems silly that I can't get the query to work when it is built in the desktop app!

Thanks!

3 Replies

  • bgreiner's avatar
    bgreiner
    Frequent Visitor

    Update: I still don't know exactly why this query construction fails when built in the desktop app, but I'm fairly certain it is related to the bracket characters ("[" and "]") in the field name. 

    The workaround that I found was to open the .rdl files in Notepad, then copy the dataset definition from the file where it works to the file where I need it, then alter as needed. Hopefully that is helpful if anyone finds this post in the future with a similar problem. 

    • Ashley_J's avatar
      Ashley_J
      Frequent Visitor

      I am also working on a report in Report Builder desktop which is connected to a semantic model in a Power BI Service workspace.  I had one column that was returning a null value in the Report Builder query, but displayed the data in Power BI reports.  The field name for this column used brackets [ ] as well.  Renaming the field name to remove the brackets in the semantic model resolved the issue for me.  You saved me a lot of frustration!

  • bgreiner's avatar
    bgreiner
    Frequent Visitor

    I'm so glad this was helpful!

    On my project, I wanted to keep the field names, so it's good to know that it can be done both ways.