Chargeback Report - VM name column empty

I try to create chargeback report. I add “CPU Used Cost” and “Memory Used Cost” fields, “VM name” field add to report automaticaly. Also I used Filter based on My Company Tag and chose Group by “VM/Instance”. Report preview shows result table but “VM name” column empty. Why is it empty?
Number of raws looks like correct and equal to number of VM with selected Tag, “CPU Used Cost” and “Memory Used Cost” fields are filled with costs.

@gtanzillo can you review this question by @Aydar.Fatykhov and forward to a SME is necessary.

Hey @jprause @gtanzillo
Is there any suggestions or workaround?

Hi @Aydar.Fatykhov

The VM name is being pulled directly from of the performance data. Specifically from the resouece_name column of the metric_rollups table. Seems like you may have some VM performance data where the resource_name is blank. I recall a bug related to that issue. It was fixed with this PR

You can fix the bad rows by running this code in a Rails console:

MetricRollup.includes(:resource).where(:resource_type=>'VmOrTemplate', :resource_name => nil).each do |p|

I would recommend that you backup your database before executing it.