accessToken - 포함하는 Power BI 데이터에 대한 액세스를 제공하는 토큰입니다. 액세스 토큰에 대한 자세한 내용은 다양한 포함 솔루션 이해를 참조하세요.
embedUrl - 포함하는 시각적 개체가 포함된 보고서의 URL입니다. 이 URL은 포함된 시각적 개체를 포함하는 HTML iframe 요소의 원본이 됩니다. 특히 API는 url을 iframesrc 특성에 할당합니다.
보고서 API 사용하여 이 URL을 가져올 수 있습니다. 두 가지 예는 다음과 같습니다.
visualName - 포함할 시각적 개체의 이름입니다. Page getVisuals 메서드를 사용하여 페이지에서 시각적 개체를 가져올 수 있습니다.
본보기
다음 예제에서는 단일 시각적 개체를 포함하는 방법을 보여줍니다.
// Set up the configuration object that determines what to embed and how to embed it.
let embedConfiguration = {
accessToken: anAccessToken,
embedUrl: anEmbedUrl,
id: aReportId,
pageName: aPageName,
tokenType: aTokenType,
type: 'visual',
visualName: aVisualName
};
// Get a reference to the HTML element that contains the embedded report.
let embedContainer = $('#embedContainer')[0];
// Embed the visual.
let visual = powerbi.embed(embedContainer, embedConfiguration);
필터
기본적으로 updateFilters API는 단일 보고서 시각적 개체를 포함할 때 시각적 수준 필터를 적용합니다.
보고서 수준에서 적용되기 때문에 포함 구성 개체에 적용된 필터와 충돌이 발생할 수 있습니다.
이 문제를 해결하려면 API를 사용하여 필터 수준을 설정할 수 있습니다.