Quantcast
Channel: Developer topics
Viewing all 18111 articles
Browse latest View live

Embed code from report is not getting executed in Title in Dashboard

$
0
0

I have taken embeded code from Report and then I place that in Dabshoboard > tile > Webcontent but it is giving me error.


power bi embed for angular js web app using service pricncipal

$
0
0

We are trying to embed power bi into we app which is based on Angular JS using the Service principal (not master a/c)

we could able to get the access token but we are facing an error in getting the embed token for it.

 

Here, the power bi is connected to azure alalysis services (without any roles)

 

Even, using postman we could only able to get access token but not the embed token (may be we are missing some parameter to pass into the API but not sure which one)

 

below is the js code which we have tried.

const getAccessToken =function(){returnnewPromise(function(resolve, reject){const url ='https://login.microsoftonline.com/common/oauth2/token';const username ='';// Username of PowerBI "pro" account - stored in configconst password ='';// Password of PowerBI "pro" account - stored in configconst clientId ='';// Applicaton ID of app registered via Azure Active Directory - stored in configconst headers ={'Content-Type':'application/x-www-form-urlencoded'};const formData ={        grant_type:'password',        client_id: clientId,        resource:'https://analysis.windows.net/powerbi/api',        scope:'openid',        username: username,        password: password};    request.post({        url: url,        form: formData,        headers: headers},function(err, result, body){if(err)return reject(err);const bodyObj = JSON.parse(body);        resolve(bodyObj.access_token);});});};const getReportEmbedToken =function(accessToken, groupId, reportId){returnnewPromise(function(resolve, reject){const url ='https://api.powerbi.com/v1.0/myorg/groups/'+ groupId +'/reports/'+ reportId +'/GenerateToken';const headers ={'Content-Type':'application/x-www-form-urlencoded','Authorization':'Bearer '+ accessToken};const formData ={'accessLevel':'view'};    request.post({        url: url,        form: formData,        headers: headers},function(err, result, body){if(err)return reject(err);const bodyObj = JSON.parse(body);        resolve(bodyObj.token);});});};   module.exports ={embedReport:function(req, res){    getAccessToken().then(function(accessToken){        getReportEmbedToken(accessToken, req.params.groupId, req.params.reportId).then(function(embedToken){            res.render('index',{                reportId: req.params.dashboardId,                embedToken,                embedUrl:'https://app.powerbi.com/reportEmbed?reportId='+ req.params.reportId +'&groupId='+ req.params.groupId});}).catch(function(err){            res.send(500, err);});}).catch(function(err){        res.send(500, err);});}};

below is the error msg:

  1. code: "InvalidRequest"
  2. message: "Dataset provided for effective identity is different from element's dataset 5fa25d64-8086-4bcb-afbb-4a43fb2e03e3"

 

]Something Went Wrong-paginated report with embedded datasource

$
0
0

Running report in Power Bi Report Builder runs fine however when saved to workspace and tried running we receive an error with the following details.

 

Something went wrong


Please try again later or contact support. If you contact support, please provide these details.
Activity ID: a120bd84-1d5d-4aa6-9f8f-113b761a5b41
Request ID: f47df340-3fd7-3454-8f7e-1b3bef2a5bd5
Correlation ID: 3f58d94d-9bcd-6790-bcc5-91b3635399fa
Status code: 500
Time: Tue Jun 25 2019 13:39:11 GMT-0500 (Central Daylight Time)
Version: 13.0.9880.163
Cluster URI: https://wabi-us-north-central-redirect.analysis.windows.net

Edit Interactions for Visuals

$
0
0

Hi Guys,

 

This is my first post here.

 

Is there a way in PowerBI in which the visual interactions that we do on a page is applied to the next page as well without using the slicers

 

e.g. If I click on a pie chart, it filters all the other visuals on the same page, how can I trigger this on other pages as well? If not straight forward, is there a work around any one has done?

 

Regards,

Sanjo

Additional Column to return text in MATRIX visual

$
0
0

Dear all,

 

Am using Matrix Visual as shown below to return value for each KPI per month.

 

I want to add an additional column that returns a text value, unfortunatly whenever i add it it doesnt show up it only shows the months. 

 

This is my current system visual

 

Before.PNG

 

This is my desired visual

After.PNG

 

I really need help Smiley Happy 

 

thank you.

Found a way to rotate reports

$
0
0

Hi,

There may be other ways to have reports rotating, but I couldn't find much when I first began, so this is what I have done in order to introduce cycling reports on our big TV's.

I use Chrome with a rotator plug in - Rotisserie URL Rotator : 

https://chrome.google.com/webstore/detail/rotisserie-url-rotator/iljemanjjfjlglhkmojkmfbpphiaheja

I then ensure I click on each report in BI, copy the URL into the plug in options and add ?chromeless=1 to the url. 

I did sometimes find if the report did not load, I had to go back to the report url to ensure the report had /ReportSection at the end of the url and then add chromeless=1 as well, e.g http://myreporturl/ReportSection?chromeless=1

I then load chrome, click on the plugin, press F11 to full screen and it can cycle as many pages as you wish.

 

Hope this may help some people.

Custom Visual - pbiviz package error

$
0
0

I'm trying to create a custom visual, however while executing pbiviz package  I've obtained those errors (see image) and then, the visual is not created..
Any idea in how to solve this problem?

Capturar.PNGThanks very much!

 

Division between Different Matrixes

$
0
0

Hi,

 

I am working on two existing  matrixes - Matrix 1 and Matrix 2 - both of which come from the very same SQL Server Table source.

 

Matrix 1 - Total Population.

Matrix 2 - The subset within the Total Population which fulfils a specified criteria (which I am working with).

 

Matrix 3 is what I am trying to create i.e Division of each Matrix 2 value over their corresponding value in Matrix 1. The Percentage values in Matrix 3 below are only HARD-CODED and is what I am trying to calculate  .

 

Please advise on the best way to create Matrix 3.

 

Matrixes_Division.JPG


How to connect to FB Workplace API?

Securely access power Bi reports from angular application without user credentials

$
0
0

We are trying to display a few power BI reports in our custom application developed using Angular 7.

We have tried both iframe and API based approach.

The issue we are facing is that every time we try to load the report it expects to provide power BI user credentials.

 

Since our custom application will be accessed by multiple users we do not expect every application user to have power BI account.

We have a generic  'application account' in Power BI which we are using to acces Power BI.

 

Is there any way we can programitically pass generic user credentials to Power UI?

What is the alternate way we can display reports without user being prompted for providing credentials? 

Error trying to embed power bi in reactjs app

$
0
0

I'm trying to show a power bi report on a website using reactjs, and through a form I want to filter the information

i have done the part of handle form data, but when i try to filter my power bi form i always get the same error

(I'm using the latest version of jquery and powerbi-client)

 

importReact from 'react';import $ from 'jquery';import* as powerbi from 'powerbi-client';classFormulario2 extends React.Component{constructor(props){        super(props);this.state ={linea:''};this.filter ={
$schema:'http://powerbi.com/product/schema#basic',
target:{
table:'RefsLineas',
column:'Assemblyline'},operator:'eq',
values:''}this.embedConfiguration ={
type
:'report',
accessToken:'correct checked token', id: 'correct id'
embedUrl: 'correct url' filters:[this.filter], settings:{
filterPaneEnabled:false}};this.handleClick =this.handleClick.bind(this);} handleClick(event){this.setState({linea: document.getElementById('linea').value}); event.preventDefault();this.initialize();this.filterSet(this.state.linea);} initialize(){var config =this.embedConfiguration;// Get a reference to the embedded report HTML elementvar $embedContainer = $('#embedContainer');// Embed the report and display it within the div container.var report = powerbi.embed($embedContainer, config);// Report.off removes a given event handler if it exists.
report.off("loaded");} filterSet(entrada){this.filter.values = entrada;// Get a reference to the embedded report HTML elementvar embedContainer = $('#embedContainer')[0];// Get a reference to the embedded report.var report = powerbi.get(embedContainer);// Set the filter for the report.// Pay attention that setFilters receives an array.
report.setFilters([this.filter]).then(function(){
alert("Report filter was set.");}).catch(function(errors){
alert(errors);});} render(){return(<div><label>Line:<input type='text' id='linea'/></label><button type='submit' value='Submit' onClick={this.handleClick}>Enviar</button><report embedType='report' tokenType='Aad' accessToken={this.embedConfiguration.accessToken}
embedUrl={this.embedConfiguration.embedUrl} embedId={this.embedConfiguration.id} permissions='All'
filterPaneEnabled={true}/></div>);}}exportdefaultFormulario2;

 

importReact from 'react';importReactDOM from 'react-dom'importFormulario2 from './Formulario2'ReactDOM.render(<Formulario2/>, document.getElementById('root'));

 

This is the error:

 

TypeError: powerbi_client__WEBPACK_IMPORTED_MODULE_2__.embed is not a function

Formulario2.initialize
D:/trabajo/web/src/Formulario2.js:48

  45 | var $embedContainer = $('#embedContainer');
  46 | 
  47 |//Embed the report and display it within the div container.
> 48 | var report = powerbi.embed($embedContainer, config);
  49 | 
  50 | // Report.off removes a given event handler if it exists.
  51 | report.off("loaded");

Power Apps

$
0
0

Dear Friends,

 

Please suggest some tutorial to learn Power Apps.

 

Regards,

Pradeep

User signing in should be avoided to view embedded reports in Angular 7 application

$
0
0

We are trying to embed the reports into angular 7  using access Token and PowerBi service, we are able to embed reports only if the user is logged in a browser session.

Is there any way to by pass this signing user to view the reports 

ggplot ggnewscale library missing

$
0
0

Hi, 

 

I need to make ggplot chart which uses 2 separate fill scales. To do this I new_scale_fill() from ggnewscale packages. It works well in my PowerBi desktop. Unfortunately, online version of PowerBI does not support this package. Since this package contains only few functions which is placed here I copied and pasted it into my R script inside PBI, but it didn't solved problem - PBI online keep returning error: "Don't know how to add new_scale_fill() to a plot". Desktop verion works in this solution. 

I scoped that problem using content of functions and found out that: ggplot2::standardise_aes_names("fill") which can be called instead of new_scale_fill is propably not in PBI: 

Error: 'standardise_aes_names' is not an exported object from 'namespace:ggplot2'.

Interesting while this is just ggplot2 function.

I need to make something like this:

https://github.com/eliocamp/ggnewscale/blob/master/man/figures/README-unnamed-chunk-1-1.png

Please, help me solve this problem. 

 

PS. There is no option here to upload image - SERIOUSLY? 

 

 

Embedding 3D model

$
0
0

Hi,

I am trying to embed a Google SketchUp model into Power Bi. I came across another post that mentioned an html viewer but unfortunately that didn't work out for me. It kept showing me errors saying that the visual can't be displayed because of blocked cookies. Here's what I did:

SketchUp model> exported to Sketchfab> extracted the embed code> plugged it into the html viewer on power BI> published the report> error> blocked cookies; no visual.

Is there a way to fix this? Or to have a custom visual that supports an interactive 3D visual on my report?

I would appreciate any help with this.

 

Thanks 

Vaish


WECO Rules Integration and Automation of Alerting When Data Set is Out of Statistical Control

$
0
0

Hi, I am working on a project that involves applying Western Electric Company (WECO) statistical control rules to a set of data to assess whether or not the data abides by these guidelines.  For example, the goal would be to not have to manually assess whether these data points satisfy the statistical control rules, but rather to have PowerBI assess this and then report which rules are broken and under which data sets.  Basically, it would be a type of early warning system.  I had to manually form a data set and determine +/-1, 2 and 3 sigma lines based off a manual determination of the average or center line of the data to visualize whether WECO rules were broken (I had to look and see if 8 points were above/below the mean line, was 1 point above/below 3 sigma, etc., and then address that) Using the python tool, could PowerBI execute that same process by automatically determining and applying sigma lines for each dataset and then reporting which sets break these rules? Could it dig even deeper by applying filters within the same time interval and dataset to see if that would violate WECO rules as well?  I am probably talking over my head with most of this, but I just wanted to see if this is possible.  I assume it would involve python to determine which filters to apply/not apply.  Thanks for the time and sorry for the wording, I am in a rush.

WECO Rules Integration and Automation of Alerting When Data Set is Out of Statistical Control

$
0
0

Hi, I am working on a project that involves applying Western Electric Company (WECO) statistical control rules to a set of data to assess whether or not the data abides by these guidelines.  For example, the goal would be to not have to manually assess whether these data points satisfy the statistical control rules, but rather to have PowerBI assess this and then report which rules are broken and under which data sets.  Basically, it would be a type of early warning system.  I had to manually determine +/-1, 2 and 3 sigma lines based off a manual determination of the average or center line for a date set to visualize whether WECO rules were broken (I had to manually visualize if 8 points were above/below the mean line, was 1 point above/below 3 sigma, etc., and then address that) Using the python tool, could PowerBI execute that same process by automatically determining and applying sigma lines for each dataset and then reporting which sets break these rules? Could it dig even deeper by applying filters within the same time interval and dataset to see if that would violate WECO rules as well?  I am probably talking over my head with most of this, but I just wanted to see if this is possible.  I assume it would involve python since there would be a determinatoin of which filters to apply/not apply, based on if they would violate the applied statistical control rules.  Thanks for the time and sorry for the wording, I am in a rush.

React Native App with PowerBI Embed Clunky Touch Controls

$
0
0

We have successfuly embeded a PowerBI report inside a React Native App.  The report is mostly functional, however, the touch controls are very clunky.   For instance to interact with bookmark button on the report, we have to double tap it with a very controled speed and precision.  Scrols on tables are imposible to engage.

 

Using: the in-built `react-native-webview`; Version "react-native": "0.58.6" and testing on iOS and Android.

 

Thank you for your help in advance.

Dataset created from python visual

$
0
0

Hi,

 

I have a quesiton in regard to the dataset that is automatically generated within python visual. When I have different columns, for example, numeric values and categorical values with different lengths. How does the dataset look like? 

 

Thank you.

Error: Changing data type returned from Web API

$
0
0

I am having trouble converting a value returned from a web API into a Date data type. The query & error are below. I would like to convert it to date so i can create a relationship to my calendar table. 

 

let
Source = Json.Document(Web.Contents("WEB API URL")),
#"Parsed JSON" = Json.Document(Source),
#"Converted to Table" = Record.ToTable(#"Parsed JSON"),
#"Expanded Value" = Table.ExpandRecordColumn(#"Converted to Table", "Value", {"Field Names"})
in
#"Expanded Value"

 

DataFormat.Error: We couldn't parse the input provided as a Date value.

 

Any ideas?

Viewing all 18111 articles
Browse latest View live


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