Quantcast
Channel: All Developer posts
Viewing all 48061 articles
Browse latest View live

Because is not possible use Direct Query and Import in the same time?

$
0
0

Hi everyone, 

 

I would like to understand beacause is not possible use Direct Query and Import in the same time on Power BI?

 

Thanks,


Re: Because is not possible use Direct Query and Import in the same time?

$
0
0

Hi ,

Power BI used to be a 'one or the other' approach with DirectQuery vs. Import, but this has changed recently. In a lot of cases it is possible to create composite models that can mix these data sources. Here's the MS documentation on it. The doc also contains an example.

There are some exceptions where you can't use composite models, though. If you're connecting to any of the following sources, they can be DirectQuery only (detailed in the Limitations and considerations section):

  • SAP HANA
  • SAP Business Warehouse
  • SQL Server Analysis Services
  • Power BI datasets
  • Azure Analysis Services

Here's some further reading/viewing into composite models that may help:

I hope this helps you out.

Daniel


If my post helps, then please consider accepting as a solution to help other forum members find the answer more quickly 🙂

APP permissions for Power BI service and use API end points in JavaScript

$
0
0

Hello: 

I wanted to display powerBI reports to my public facing website. The users of the website will not have powerBI account. I plan to use powerBI pro account to get the Authentication Token and then embed the report in public facing website. 

So far I have done following stuff: \

1. I followed these step and register my app at powerBi. https://docs.microsoft.com/en-us/power-bi/developer/register-app

2. I received APP ID / Client ID.

3. Now I went to https://portal.azure.com/ , I see my app under Azure Active Directory=> App registrations.

4. I selected my app, and went to API permissions. Under the API permission, I see Azure Active Directory Graph already there. Also the permission selected for this is User.Read. 

5. I clicked, Add a permission button and added Power Bi Service, with Reports.Read.All and Reports.ReadWrite.All permission. 

6. Now I went back to Home and selected App registrations again, this will give me the list of all the registered APP including the one that I added in step # 1. 

7. Now I selected the APP that I created. It takes me to the below page (see image). There are various Quickstart guide for different technologies. It provides working application. guide.JPG

 

8. I used JS. It gave me SPA (Single Page Application) (see image above)

9. This SPA works good with Microsoft Graph API and list the login user info (https://graph.microsoft.com/v1.0/me)

10. It is giving me an error when, I am trying to use different end point (https://analysis.windows.net/powerbi/api) with scope value": ["Report.ReadWrite.All"]

 

ServerError: AADSTS650053: The application 'Demo' asked for scope 'Report.ReadWrite.All' that doesn't exist on the resource '00000003-0000-0000-c000-000000000000'. Contact the app vendor.

 

How to add API permission for Power Bi Service and use into JS to call the APIEndPoint (https://analysis.windows.net/powerbi/api)

 

Any idea/help would be greatly appreciated. 

 

Regards

 

Is it possible to use an API Bearer to load a report preauthenticated

$
0
0

I have a rest application with Power BI. I upload a dataset and generate a report.

After the report is uploaded I would like to show the user the report. They have already authenticated to use my REST code... and I have that bearer. Is there any way to show the report without prompting the user to authenticate again? 

Read Filter in Custom Visual

$
0
0

Hi,

 

Is it possible to read the filter settings in the custom Visual? So not only receiving filtered data, but actually to read it somehow?

The custom visual should react to the filter, but not only to the new data provided. It is needed to navigate in a map in a read-only report.

 

If I'm correct the filter API, does not provide read functinality. The api only sets filters.

Also the InteractivityFilterService does not do the job.

 

 

 

import { InteractivityFilterService } from "powerbi-visuals-utils-interactivityutils/lib/interactivityFilterService";

 

 

 

And the options.jsonFilters property in the update-function is always empty.

 

I saw in an example the following: Capabilites.json

 

 

 

"selfFilter": { "type": { "filter": { "selfFilter": true } } }

 

But this does not provide anything.

 

I also tried the following (which is also always empty)

dataViewObjects.getValue(data.metadata.objects, Filter.filter)

 

Maybe someone can provide an good example, because all examples from microsoft are outdated.

 

Thanks.

Custom visuals does not get refreshed by changing filters

$
0
0
Hello there, 
 

I am trying to develop a custom vis in Power BI through R script as suggested here:

 https://stackoverflow.com/questions/39368729/is-it-possible-to-use-r-plotly-library-in-r-script-visual-of-power-bi 

 

So, I have developed my pbivis item, with a dataset composed of 5000 records.

 

I have tried it in R and it works great. In BI this works for the first time, but when I change any filters, nothing shows up in this newly developed pbivis item unless I go to another tab of my report and then come back to this tab which has this newly developed pbivis.

 

I have also noticed that if I maximize this item (pbivis), then the chart disappears (i.e. shows nothing).

So not sure how to solve this.

 

I have posted this in stackoverflow but still no response. I am not sure if I shall remove my question from stackoverflow or here. Thanks for the advice.

 

 

Re: Unable to update credentials via REST API?

$
0
0

The docs specify the following Request Body schema for OAuth2 authentication:

 

$UpdateUserCredential = @{
    credentialDetails = @{
        credentialType = "OAuth2"
        credentials = "{`"credentialData`":[{`"name`":`"accessToken`"`"value`":`"$token`"}]}"
        encryptedConnection = "Encrypted"
        encryptionAlgorithm = "None"
        privacyLevel = "None"
    }
} | ConvertTo-Json
 
Like you I'm also extracting the access token from Authorization Header (tried with and without Bearer prefix) however I'm getting the error "value=The credentials provided for the SQL source are invalid. (Source at ServerName;DatabaseName.)" despite having granted permissions to the account.
 
Good luck.

Re: Update Datasources REST API operation for live connections

$
0
0

Hi,

 

I am facing similar Issue, did you get solution for this.

 

 


Power BI Embedded requires login

$
0
0

Can i use just a pro account to embedde reports to my customers? or really need a power bi premium account? I'm using APP OWNS DATA scenario and at the beggining, i was able to see reports without log-in, but now, a few of my reports requires login.

Re: Power BI Embedded requires login

$
0
0

You can use Pro account for embed your reports for APP Owns data. Premium capacity is needed only for PROD environment.

 

Just for your information, for app owns data you can implement that even with-out using the Pro account by using SPN Approach

Re: Embed Power BI report into SharePoint Online - Web part options not working

$
0
0

I am still having problems with this issue.  I have created reports from scratch, published them, and then insert them on my SharePoint page using the Embed to Sharepoint link.  At first the options for page name, display, and filter/navigation options appear but then they go blank as soon as I click on them to change them.  Can anyone help?

Re: Extract types of dataview metadata

$
0
0

Hi ,

In terms of structure, the type property is a ValueTypeDescriptor, of which only the properties text thru none are included in the interface spec. This means that the underlyingType thru categoryString properties are presumably added by the developer visual (which the API implements). As such their implementation details aren't in the source code and it's going to be hard to figure out what those mean, or rely on them consistently.

You can see that there are some overlaps also, such as numeric and integer.

In my experience, if I have a dependency on the column type, I'll typically switch on them while iterating through and manage my logic that way (e.g. dates vs. numbers for axes) when building my view model.

If you are able, it might be worth providing some details of your particular use case, as we might be able to find a way to achieve what you are ultimately setting out to do.

Regards,

Daniel

Re: APP permissions for Power BI service and use API end points in JavaScript

$
0
0

Hi  ,

 

You can add the API Permissions in the azure portal app registration page itself

 

Capture.JPG

Measure to calulate number of nights from two date columns

$
0
0

We have scenario where we need to calculate number of nights by using two date columns.

Challenge is when we select the date range from slicers (of both the columns), if one of the columns condition don't returns true, it will skip that complete record

 

For example:

We need to calculate number of night for period From Date='02/Jan/2020' - To Date='09/Jan/2020'

By selecting these dates from both date slicers of "From Date" & "To Date", result would be:

 

dax.PNG

 

 

 

 

It would be a great solution if we get Measure which works with one date slicer to select the date range and gives desire output.

 

Thanks

Ali

Re: Is it possible to use an API Bearer to load a report preauthenticated


Re: Unable to update credentials via REST API?

$
0
0

Hi  ,

 

If you want you can use my powershell script where i did the same Basic update credentials without having any issues

 

$applicationId = "" # Need to pass the clientid from devops variable $clientsec = "" | ConvertTo-SecureString -AsPlainText -Force # Need to pass from devops secret variable $credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $applicationId, $clientsec Connect-PowerBIServiceAccount -ServicePrincipal -Credential $credential -TenantId "" # Need to pass from devops variable $workspacename="PowerBI_CICD_PROD" $datasetname="AdventureReports" ## user credentials $username= "sadmin" $password= "Password@123" # Need to pass from devops secret variable ##Getworksapce $workspace =Get-PowerBIWorkspace -Name $workspacename # GetDataSets $DatasetResponse=Invoke-PowerBIRestMethod -Url "groups/$($workspace.id)/datasets" -Method Get | ConvertFrom-Json # Get DataSet $datasets = $DatasetResponse.value foreach($dataset in $datasets){ if($dataset.name -eq $datasetname){ $datasetid= $dataset.id; break; } } ## Take Over DataSet Invoke-PowerBIRestMethod -Url "groups/$($workspace.id)/datasets/$($datasetid)/Default.TakeOver" -Method Post ## update data source credentials $BounGateway=Invoke-PowerBIRestMethod -Url "groups/$($workspace.id)/datasets/$($datasetid)/Default.GetBoundGatewayDataSources" -Method GET | ConvertFrom-Json $UpdateUserCredential = @{ credentialType ="Basic" basicCredentials = @{ username= $username password=$password } } | ConvertTo-Json Invoke-PowerBIRestMethod -Url "gateways/$($BounGateway.value.gatewayId)/datasources/$($BounGateway.value.id)" -Method PATCH -Body $UpdateUserCredential | ConvertFrom-Json ## update parameter API $postParams = @{ updateDetails =@( @{ name="blob" newValue="https://demo.blob.core.windows.net/" } ) } | ConvertTo-Json Invoke-PowerBIRestMethod -Url "groups/$($workspace.id)/datasets/$($datasetid)/Default.UpdateParameters" -Method Post -Body $postParams | ConvertFrom-Json

 

 

Re: Get Capacities API incredibly slow

$
0
0

Seems to have been fixed now. Capacities are returned within 5 seconds or so.

Re: Gateway public key size problem

Update Parameters using PowerBI-Javascript

$
0
0

I am using Parameter for a Stored Procedure. I want to update this parameter dynamically.
How can I update Parameters using PowerBI-Javascript? Is there any other way than using a parameter?


asdsadxzvzv.JPG

 

Strange prefix on USERNAME() and USERPRINCIPALNAME() for external users

$
0
0

We are working on exposing Power BI reports to external users, so I am setting up RLS on the reports using USERNAME(). When sharing with an external test email address, I discovered that Power BI tacks live.com# in front of the username, causing RLS not to work as expected. The same thing happened with one other test email address, but no prefix was added on a third test email address. The same thing happens with USERPRINCIPALNAME().

 

I have a workaround, but I still have a couple questions:

1. Is there a way to prevent the prefix from getting added on?

2. Are there any other prefixes that could appear that I need to be aware of?

 

Thanks in advance for the help!

Viewing all 48061 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>