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

Re: Power Bi embedded - interaction through dataSelected event

$
0
0

HI ,

For the 'data selected' event, it seems only got the current operation fields. So if you not add the field to your report visuals, it was not pick up other fields value based on the 'data selected' event.

In my opinion, I'd like to suggest you add processing with rest API to lookup specific value fields. The data selected event will show the table and column which the filter/slicer hosted.
if they stored in the same data table, you can use the rest API to get the data table and use the current value as a parameter to find out other field values.

"dataPoints": [ { "identity": [ { "target": { "table": "Product", "column": "Manufacturer" }, "equals": "xxxxxx" } ]

Push Datasets - Datasets GetTables 

Regards,

Xiaoxin Sheng


ALM toolkit - power query

$
0
0

dear colleagues,

 

trying to use ALM toolkit to deploy Azure Analysis services database, I realized each time there is a change in power query, the change is not deployed.

ie: if I create a new column in power query on a table, when processing the model deployed with ALM, there is an error message mentioning the column source is not found, and looking at the code itself, indeed the power query code has not changed after deploying.

 

do you know why ? Is it a limitation, an error from mine in parameters

REST Api - Access Token 'The remote server returned an error: (401) Unauthorized.'

$
0
0

Good morning / afternoon / evening everyone

 

First of all, apologies for my ignorance and for any stupid questions I ask. I'm new to Power BI so very much finding my feet.

 

Ok, so what I am trying to do is creat a small console app that gets the refresh history for a particular dataset but I am having all sorts of trouble with the access token. Here is the code I have:

 

 

private static string GetToken() { //OAuth2 authority Uri string authorityUri = "https://login.microsoftonline.com/common/"; // AcquireToken will acquire an Azure access token // Call AcquireToken to get an Azure token from Azure Active Directory token issuance endpoint AuthenticationContext authContext = new AuthenticationContext(authorityUri); var credential = new ClientCredential(_clientId, _clientSecret); var authenticationResult = authContext.AcquireToken("https://analysis.windows.net/powerbi/api", credential); token = authenticationResult.AccessToken; HttpWebRequest request; var url = "https://api.powerbi.com/v1.0/myorg/datasets/{DATASETIDHERE}/refreshes/?$top=1"; request = WebRequest.CreateHttp(url); request.Method = "GET"; var tryItToken = "eyJ0eXAiO etc etc etc"; //Add token to the request header request.Headers.Add("Authorization", String.Format("Bearer {0}", token)); using (var response = (HttpWebResponse)request.GetResponse()) { var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd(); dynamic array = JsonConvert.DeserializeObject(responseString); } return token; }

 

 

tryItToken is populated with the token that is generated from here https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getrefreshhistory .

 

Now, whenever I pass in the try it token, I get the repsonse back absolutely fine.  However, if I replace the tryItToken with the token I get through authenticationcontext.AcquireToken I am receiving the 401 Unauthorized.

 

Can someone point me in the direction of the steps I have clearly missed out in getting this working correctly from within code?!

 

Thanks in advance.

Re: Power BI Custom Visual - Interaction with Matrix Visual

$
0
0

Thank you for the input.

 

I tried the ISINSCOPE function, but it doesn't work that well when you want to switch the legend of a clustered column chart.

 

I was planning to develop a new visual using d3/typescript, but then I don't know how to get the selected hierarchy level of the matrix.

Power BI custom visuals API - get applied filters

$
0
0

Hi all,

 

Is there any way, using the custom visual API, to get the filter(s) and filter values applied to visual? So basically the "conditions" for the dataset currently served from Power BI?

 

- Thanks!

Re: MAX VALUE/MEASURE ISSUE

$
0
0

Hi  ,

 

Please create a measure like this.

__Max_value = VAR __table = SUMMARIZE( Sheet4, Sheet4[Date], "__Value", SUM(Sheet4[Value]) ) RETURN MAXX( __table, [__Value] )

v-lionel-msft_0-1599212071757.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Re: MAX VALUE/MEASURE ISSUE

$
0
0

This works.  Accepting as a solution.  Thanks for your help!!!

Re: AADSTS500011: The resource principal named http://analysis.windows.net/powerbi/api/ not found


Re: REST Api - Access Token 'The remote server returned an error: (401) Unauthorized.'

Impersonate Another User

$
0
0

I am embedding a PowerBI report in a web app using my admin credentials to obtain the access token. I would like to automatically impersonate another when they open the embedded report so that they automatically only see data that pertains to them. Is this possible?

powershell for audit of cheduled refreshes

$
0
0

Hi,

 

Have powershell script which gives info on refreshes workspace, dataset name, report name, date of refresh.

 

However, looking for the gateway the reports refresh under as we have a few gateways.

 

How can we best report the associated gateway used in these refreshes.

 

 

Thanks


# filter out 'report usage metrics model' dataset - always there
foreach ($ds in ($datasets | Where-Object { $_.Name -ne "Report Usage Metrics Model"}) )
{
Write-Verbose "Dataset: $($ds.Name)"
# successful refreshes
$historyItems += Get-RefreshHistory -Workspace $ws -Dataset $ds -Scope $Scope -Top $Top |
Where-Object {$_.serviceExceptionJSON} |
Select-Object -Property id, refreshType, startTime, endTime, status, serviceExceptionJson, `
@{n='WorkspaceName';e={$ws.Name}}, @{n='WorkspaceId';e={$ws.Id}}, @{n='DatasetName';e={$ds.Name}}, @{n='DatasetId';e={$ds.Id}},`
@{n='ErrorCode';e={""}}, @{n='ClusterUri';e={""}}, @{n='ActivityId';e={""}}, @{n='RequestId';e={""}}, @{n='Timestamp';e={""}}

# failing refreshes
$historyItems += Get-RefreshHistory -Workspace $ws -Dataset $ds -Scope $Scope -Top $Top |
Where-Object {-not ($_.serviceExceptionJSON)} |
Select-Object -Property id, refreshType, startTime, endTime, status, @{n='serviceExceptionJson';e={$null}},`
@{n='WorkspaceName';e={$ws.Name}}, @{n='WorkspaceId';e={$ws.Id}}, @{n='DatasetName';e={$ds.Name}}, @{n='DatasetId';e={$ds.Id}},`
@{n='ErrorCode';e={""}}, @{n='ClusterUri';e={""}}, @{n='ActivityId';e={""}}, @{n='RequestId';e={""}}, @{n='Timestamp';e={""}}
}

Power BI Reports to be Shared in Splunk Dash Boards

$
0
0

Hi Team,

 

We have developed reports in Power Bi Desktop and Published the same in Power Bi Service, where the reports gets refreshed on Daily Basis, and we have a requirement to use these reports in Splunk Dash Board.

 

We would like to know how we can utilize these reports in Splunk Dashboard.

 

People can view the Power bi Developed Reports in Splunk Dash Board.

 

Your help in this regard is highly appreciated.

 

Regards

Srini

Re: Power BI Reports to be Shared in Splunk Dash Boards

Power BI API for Splunk

$
0
0

Hi Team,

 

Do we have any Power Bi API's which can be used with Splunk to fetch data from Power Bi  to Splunk.

 

Regards

Srini

Re: Power BI API for Splunk


Optimal VM setup for Enterprise Gateway?

$
0
0

Hi All,

 

I'm looking to set up some virtual machines to host data gateways for refreshing my data. Is there an optimal set up that keeps costs down with consistent performance? I plan on refreshing maybe 5 times a day? Up to 8.

 

Any resources would be appreciated.

 

Chris

Re: Optimal VM setup for Enterprise Gateway?

$
0
0

 - 

It can be difficult to accurately estimate the right size. We recommend that you start with a machine with at least 8 CPU cores, 8 GB of RAM, and multiple Gigabit network adapters. You can then measure a typical gateway workload by logging CPU and memory system counters. For more information, see Monitor and optimize on-premises data gateway performance.

From - https://docs.microsoft.com/en-us/power-bi/guidance/gateway-onprem-sizing

 

You could try starting with a D2 v3 which is about $150/month. Might be OK. Worst case, go with a D8 v3 for $600/month. If you only run it during business hours (8 hours a day) those costs are 1/3rd or less (no weekends)

 

Re: Optimal VM setup for Enterprise Gateway?

$
0
0

5 to 8 refreshes a day?  You barely need a single VM for that.

 

Here's what we use in our company (in addition to all the rogue single-VM gateways):

 

- gateway cluster with four VM members, geographically dispersed for BCP reasons

- each VM has 8 cores, 32GB RAM, 100GB free disk space

- all VMs are running Server 2012 R2 (meh) with all the latest and greatest patches applied and all required database drivers installed (Oracle, MySQL, PostGres, Vertica, HortonWorks etc etc.)

- extensive monitoring to make sure all cluster members get their fair share of work and that refresh queries complete in reasonable amount of time

 

This setup supports about 150 connections and about 500 refreshes per day with some breathing space.  The Gateway Admin console is a surprising bottleneck as it gets really slow after you add 100 or so connections.

Re: powershell for audit of cheduled refreshes

$
0
0

You can't.  You need to pull the gateway logs for that, separately from each cluster member, and then glue them together.

 

These logs are notoriously hard to read. In addition they are reporting on Data Source refresh, not necessarily dataset refresh.  You need to go hunting for "ObjectId" in column 8. That is the dataset ID.

PowerBI Expressions

$
0
0

Hi,

        I need to calculate MTD,YTD and Inception to date(ITD) on the basis of the CycleID concatination with the date range selected in the slicer(filter). The graph should display Total amount by MTD cycleid wise, Total amount by YTD summation of all cycleid amounts for the particular year selected in the slicer from the start of the year till date and Total amount by ITD summation of all cycleid amounts till date seleted in slicer.

 

Can anyone help me out on this as soon as possible?

Quick response to this question will be much helpful to me as I need to submit the task today itself.

 

Thanks & Regards,

Dhara

Viewing all 49192 articles
Browse latest View live


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