/
Comparison PBI & PP Objects (Reports)
Comparison PBI & PP Objects (Reports)
Get the differences between PBI service and PowerPlatform service regarding each report deployed in PBI. If different reports, build a dictionary and return the latter.
public static Dictionary<string, string> CompareBuiltObjects(List<PowerBiEmbedder.BuilderObjects.Report> pbi, List<PowerBiEmbedder.BuilderObjects.Report> pp)
{
var reports = new Dictionary<string, string>();
for (var i = 0; i <= pbi.Count - 1; i++)
{
for (var j = 0; j <= pp.Count - 1; j++)
{
if (pbi[i].ReportNameInPBI.IsEqual(pp[j].ReportNameInPP))
{
if (!pbi[i].ReportGuidInPBI.ToString().IsEqual(pp[j].ReportGuidInPP.ToString()))
{
reports.Add(pbi[i].ReportGuidInPBI.ToString(), pbi[i].ReportNameInPBI);
}
}
else { continue; }
}
}
return reports;
}
, multiple selections available,