Forum Discussion
PowerBI Service - Scheduled Refresh
Hi Anonymous ,
Does your problem have been solved? If it is solved, please mark a reply which is helpful to you.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
- Anonymous5 years agoNot applicable
Hey so the problem didn't get solved based on the documents that were shared here but I actually reimplemented the entire report and ended up running in this permission issue fiasco at the very end but this helped me realise what the actual problem was. I will try my best to explain it here so here goes.
So let's say we have a table (T1) with certain details like account id, license id, license name etc. Now the issue occurs since I am calling cosmos for each row. This for each on each row calls the following query: "select * from c where c.Type = 'doctype' and c.AccountId = '"&[AccountId]&"' "
Now this works flawlessly for my case when no privacy level check is done but causes problems when I try to refresh the report on power bi service
- v-kkf-msft5 years agoCommunity Support
Hi Anonymous ,
I tested and found that there are two ways to refresh successfully.
1. Manually enter the NotScannedAccounts[AccountId] column you quoted in the query, as shown below. But this will make the AccountID value fixed.
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1YlWMlKKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [AccountId = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"AccountId", type text}}) in #"Changed Type"let final = Text.Combine(EnterTable[AccountId], "','"), Source = DocumentDB.Contents("https://xxxxxx", "ToDoList", null, [Query = "SELECT VALUE root from (SELECT c.id, MAX(c._ts) as maxval FROM Items c where c.id in ('"&final&"') group by c.id ) as root "]), #"Expanded Document" = Table.ExpandRecordColumn(Source, "Document", {"id", "maxval"}, {"Document.id", "Document.maxval"}) in #"Expanded Document"2. Import all the data into PowerBI, and then use parameters or manual or DAX to filter the data.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.