PowerBI EnableFolding - powerbi

September update have changed how to consume data from Postgres.
M code will change to something like this:
Value.NativeQuery(PostgreSQL.Database("server", "db"), "query", null, [EnableFolding=true])
How can I change to function as before the update?
PostgreSQL.Database("server", "db", [Query="query"])
Or now I would need to do it manually?
Regards,

Finally Microsoft gave me the workarond: just remove [EnableFolding=true] from query, advance editor (the one showing the m language)

Right yesterday I went into the same issue.
Data refresh now works only from desktop while fails for any new query created with latest Power BI once published on service.
Tried to set EnableFolding=false and EnableFolding=none as error message suggests but both throwing a error.

Related

"sequence contains no matching element" on Group By operations in Power Query

Power BI newbie question here.
Whenever I add a Group By step with a Text.Combine() or a Max() aggregate, applying changes or refreshing data results in the aforementioned exception.
My datasource is a D365 dataverse connection, all queries run just fine until I add a step to group and aggregate. As an example, starting with a very simple query with 2 columns (demandId, kor_subcontractorbillnumber) I want to concatenate in a csv column all billNumbers related to a given demandId :
= Table.Group(#"Table Buffer", {"demandId"}, {{"BillNumbers", each Text.Combine([kor_subcontractorbillnumber],", "), type nullable text}})
As seen in the attached screenshot, the preview on screen seems correct : the expected result is displayed in the BillNumbers column, and no error is reported in the column quality indicators. All is fine...until I click Apply, which raises the exception.
I tried to clean the columns as much as possible before grouping (removing empty values, errors, duplicates, etc.), as well as adding an extra step to store results in a table buffer before grouping but with no luck.
Browsing through SO I found that similar issues could be related to :
Wrong relationship cardinalities : does not apply here I guess since everything is correct in the buffer table until I group
Power Bi Desktop update : some users have reported in the past that an update broke something and gave the same exception. In my case, the issue started occurring after upgrading to July 2022 version and unfortunately it seems I can't downgrade to a previous version. I've started using PowerBi in June and do not have much experience to detect whether the july update actually broke something, though some reports ceased functioning short time after the update.
Even stranger : If I remove the last step (Group By) and I create a new query referencing this one... I can add a Group By step and apply my changes...until I Refresh my report : at this point all the embedded queries fail with the same exception, even those absolutely unrelated with my changes.
Could anyone explain me what I'm doing wrong or if you have experienced the same behavior with the last version of Power Bi desktop ( 2.107.841.0 64-bit), which could point me to the right direction ?
Thanks for your help !
After many tries, I eventually stumbled upon a workaround: instead of the Group By step, I clicked on the very last step of my query and selected 'Extract Previous'. This created a new query (result of all previous steps), and I was able to perform my Group By on this new query without any errors.
I have no idea how this is different from adding the Group By at the end of the first query... but the exception is gone. Kind of a code smell anyway...I mark my own question as answered in case it can help someone, but I'd more than happy if someone could shed some light on the underlying reason of this issue.

Power BI Activity Log UpdateWorkspaceAccess

When calling
Get-PowerBIActivityEvent -StartDateTime ($start) -EndDateTime ($end) -ActivityType UpdateWorkspaceAccess
I expected to get all changes to workspace access across all workspaces, similar to activity type ViewReport gives me all report views. For some reason it seems to return activity for the user I'm currently logged in as. Can't find any detailed docs on how UpdateWorkspaceAccess is supposed to work.
Grateful for any pointers.
Well normally this works for me
Get-PowerBIActivityEvent -StartDateTime 2021-12-21T00:00:00 -EndDateTime 2021-12-21T18:00:00 -ActivityType viewreport | Out-File –FilePath C:\Users\Administrator\Desktop\Process.json
You can also use Power BI Rest API :
GET https://api.powerbi.com/v1.0/myorg/admin/activityevents?startDateTime={startDateTime}&endDateTime={endDateTime}&continuationToken={continuationToken}&$filter={$filter}

Dynamic query (Current date) via web services in Power Bi

In my project we are consuming the company's data via Web Service REST. Today we don't do the query dynamically by passing the start date and end date parameters via string.
enter image description here
My goal is for the end date to update dynamically. I've already created a query that takes the current date but I can't put it in the parameter without generating an error in the query.
enter image description here
This is the error message I get when I put the column value in the parameter:
enter image description here
I'm pretty sure I'm getting the syntax wrong. Anyone who can help me, I really appreciate it. I would like to point out that the date format for the API call to work is DD/MM/YYYY.
Can you try using
PutYourOtherTableNameHere[Hoje_Coluna]{0}
instead of
[Hoje_Coluna]
?
To see if that will work, put this in right before your query, then click on the step and see what it returns.
x = PutYourOtherTableNameHere[Hoje_Coluna]{0},

Column 'No.' of the table wasn't found. Nav2016 data import to PowerBi

I am new to PowerBI and I am trying to get data from Dynamics Nav 2016 in PowerBI Online and I get this error:
We couldn't import data from Microsoft Dynamics NAV
Make sure you're entering the information correctly.
Please try again later or contact support. If you contact support, please provide these details.
Data source type
Processing errorThe column 'No' of the table wasn't found.
Correlation ID28883962-32de-95fe-bf97-85f2c3699964
Activity ID558a71dd-3cee-455e-a8e7-6b00180688f6
Request IDe864480c-e56e-287f-d891-f21a816076ff
Status code500
TimeMon Oct 31 2016 17:09:44 GMT+0200 (GTB Standard Time)
Version13.0.1700.493
Cluster URIhttps://wabi-north-europe-redirect.analysis.windows.net
Has anybody encountered something similar?
Make sure all oData feeds have data in them.
In my example of this issue, I had to create a Opportunity so that the "SalesOpportunities" feed had at least one entry in it. Otherwise, it caused the error you noted above.
This also means making sure your Account Schedule KPIs has values too.
I wouldn't view the Content Pack as anymore than Demo-esque material. 9 times out of 10 it's not tailored to the organization so the graphs aren't as useful.

Data truncated error via ODBC

i'm trying to query a table with c++ odbc using 'sql driver'.
While i'm trying to open the table using my query i get 'Data truncated.' error. I checked it out, the data i'm passing for that query is no longer than 255 in length, i think it is a bug.
did some one solved that issue? any suggestions?
windows 7, sql server 2008, vs 2010.
Thanks in advance.
the fix up
check not only the parameter you pass during open but also the fields that are being transferred during DoFieldExchange() function, in my case that was another record field that was transferred to me from the sql and messed things up.
refer the link for the fix up.