Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Cannot delete or change certain measures. "Object reference not set to an instance of an object".

One can connect a Power BI report to another Power BI report for its data source. (Matt Allington calls this a thin workbook and a golden dataset). If you publish the thin workbook, go to it in the Power BI Service, click File>Save As, then a new report will be generated which is the thin workbook and the golden dataset merged together. However measures that were orginally local to the thin workbook cannot be viewed, edited or deleted in the new merged report. In fact trying to delete these measures you will get the error: "Object reference not set to an instance of an object".

 

There is another problem with these "problematic" measures. If you connect a report to the merged dataset then those measures won't come through.

Status: Needs Info
Comments
v-yuezhe-msft
Employee

@DingbatData,

It seems that you are connecting to Power BI Service dataset in Power BI Desktop, create a report(A) and publish the report to Power BI Service, then create another report(B) based on the A report in Power BI Service using save as feature in Power BI Service.

After downloading B report from Power BI Service, you are able to delete or change measure in the B report, right? If that is the case, I test the whole process in Power BI Desktop(2.65.5313.1381) and everything works well.

What is your Power  BI Desktop version? Could you please describe the steps you are taking?

Regards,

Lydia

v-yuezhe-msft
Employee
Status changed to: Needs Info
 
DingbatData
Advocate I

Hi Lydia,

 

Just tried it again with a simple case and the problem still persists. I have 

2.65.5313.1381 64-bit (December 2018) 

The steps are:

  • Create a new report called A
  • Connect A to a datasource called B
  • Create a measure in A
  • Publish A to Power BI Service
  • View A in Power BI Service and click then "File>Save As" in Power BI Service to create report named C
  • Download and Open C and when I click on measure that I had originally created in A I find the following problems:
    1. The measure evaluates to 0 or a blank  
    2. The measure does not display a formula
    3. You cannot delete that measure instead you get the error "Object reference not set to an instance of an object"
    4. If you create a Report named D and connect it to C then you get more error messages and the whole things comes even a bigger mess.
Rickmaurinus
Helper V

This issue is still there. 

 

1. Create a lean report (connected to a dataset)

2. add a measure to the Lean report itself  

3. Add the same measure to the dataset

4. Return to the lean report. You can't delete the measure in the lean report anymore, but get the message 

 

Rickmaurinus_0-1671025980248.png

 

Any fix for this yet?

 

 

--------------------------------------------------

@ me in replies or I'll lose your thread

 

Master Power Query M? -> https://powerquery.how

Read in-depth articles? -> BI Gorilla

Youtube Channel: BI Gorilla

 

If this post helps, then please consider accepting it as the solution to help other members find it more quickly.

wzbeaver
New Member

I just wanted to add a comment to this thread to hopefully get some more attention on this matter. This is still an issue while editing the 'Lean report' as described by Rickmaurinus.

 

The work around that I have found for this is to do the following on the Lean report:

  1. Go to Transform data --> Data source settings, and change your data source to another PBI Service hosted data set.
    1. Note that this dataset, must contain the tables that the duplicated measure references.
      1. If not, then it simply hides your measures.
    2. And also must not have measures of the same name.
    3. Example: Measure A calculates from Table A, you need to host a dataset with Table A available but no Measure A can be present.
  2. After swithcing the source, search for your duplicated measure.
  3. Either change the name to something unique, or delete it from the report.
  4. Change your connection back to the actual data set that you want to leverage, and you should have just one version of the measure.

This really needs to be fixed so that you can do this natively without having to change the Dataset connection. This is a real problem for trying to improve enterprise workspaces where you want to normalize data sources for user developed reports. 

 

PBI Desktop even knows that there is an issue and presents this message with no ability to fix it:

 

wzbeaver_0-1675705712764.png