Forum Discussion
Use SQL Store Procedure in Power BI
This code executes as intended in Desktop, but fails in Power BI cloud.
DECLARE @CustomerNumberIDList dbo.IdList
Declare @Success int
INSERT INTO @CustomerNumberIDList
SELECT Distinct CustomerNumberId
FROM [dbo].[vw_ReportSummary]
EXEC @Success=[dbo].[LogCustomerView] @CustomerNumberIDList
If @Success=0
SELECT *
FROM
[dbo].[vw_ReportSummary]
My requirement is to log the key values anytime a customer is used in a report for privacy resason. The portion that does the logging: 'EXEC @Success=[dbo].[LogCustomerView] @CustomerNumberIDList' works like a charm whenever I refreesh in Power BI desktop, but doesn't log the key values when I run the exact same report after uploading it to the cloud. It does still get the dataset though.
An y ideas on why that call to log the keys only works in desktop?