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

How to Connect to AxDW database

$
0
0

Hi Friends,

 

I am new to Power BI and Dynamics 365, actaully i need to develop Power BI reports using D365 data. So after doing some search i found there are already entities store database in D365 by which i can connect and develop the reports in power BI. But i am not able to see or connect to this database since i m using azure for D365.

 

So, can anyone suggest me the solution or any link/document by reading i will be able to develpo my report.


Re: Reload dataflow from powershell script

$
0
0

Hi ,

 

I have the exact same problem. Have you found the solution?

 

Thanks,

Jure

Re: Images not loading in Chiclet slicers

$
0
0

Has this been solved?  I am having this issue today.

 

image.png

SSAS tabular as a source - map user name

Question About Calculation

$
0
0

Sample:

 

PhaseINPUTOUTPUTRESULT
PP105Division of Cleared with Input
PRO2010Division of Cleared with Input
OT3015Division of Cleared with Input
Overall  PP*PRO*OT

 

I have added the Measure to calculate Cleared with Input which is the division of Cleared being Numerator with Input being Denominator.

 

How do i multiply the Results of all three phases and get the FINAL RESULT in the Overall Row as mentioned above?

Re: R script Getting Error Unable to translate bytes

$
0
0

Hi  ,

 

I am using the same R library to extract tweets in powerBI . My R script is working fine when the search_term is hardcoded. But when I am trying to create an invoked function to pass the search_term as a parameter it gives the following error. 

 

An error occurred in the ‘’ query. DataSource.Error: ADO.NET: R script error.
During startup - Warning message:
In setJsonDatabasePath(system.file("extdata/capabilities.json",  :
  bytecode version mismatch; using eval
Error: unexpected symbol in:
"rScriptWrapper_options = getOption('save.image.defaults')
save(list = rScriptWrapper_dataFrames, file = "globalEnv.rdata"
Execution halted

Details:
    DataSourceKind=R
    DataSourcePath=R
    Message=R script error.
During startup - Warning message:
In setJsonDatabasePath(system.file("extdata/capabilities.json",  :
  bytecode version mismatch; using eval
Error: unexpected symbol in:
"rScriptWrapper_options = getOption('save.image.defaults')
save(list = rScriptWrapper_dataFrames, file = "globalEnv.rdata"
Execution halted

    ErrorCode=-2147467259
    ExceptionType=Microsoft.PowerBI.Scripting.R.Exceptions.RScriptRuntimeException

I am very new to PowerBI and hence trying a  lot to solve this issue. I really appreciate any suggestion regarding this. I am also attaching the R script for creating the invoked function.

(Name as text) as table=>
let
  Source = R.Execute(" #(lf)   library(twitteR)
                         #(lf)   library(stringi)
                         #(lf)   consumer_key <- ""8R96HfpMmwog1w4V0f6HrfwS9"" 
                         #(lf)   consumer_secret <- ""Smun1VSNdn30P5HfvAJ4AR8XSmqOevkGCvwQ2RJpXrHptRTEui""
                         #(lf)   access_token <- ""1306483171-2I5rsnK7AvYStXEja7lDu9AAI7ftuv6CvcbhhW0""
                         #(lf)   access_secret <- ""SlsagLzQfoaE0VzocM6ycFLqSk0PtImwekwENZt339yej""
                         #(lf)   setup_twitter_oauth(consumer_key, consumer_secret, access_token, access_secret)  #(lf)   str1 <- ""#""
                         #(lf)   str2 <- ""&Name&""   (passing parameter here)
                         #(lf)   search_term <- paste(str1,str2,sep="") 
                         #(lf)   number_of_tweets <- 100
                         #(lf)   language <-'en'
                         #(lf)   tweets <- searchTwitter(search_term, number_of_tweets,language)
                         #(lf)   df_tweets <- twListToDF(tweets)
                         #(lf)   df_tweets <- df_tweets[,c('text','favorited','favoriteCount','created','retweetCount',
                                                                                              'isRetweet','retweeted')]
                         #(lf)   df_tweets$text <- stri_encode(df_tweets$text, '', 'UTF-8')"),
    df_tweets1 = Source{[Name="df_tweets"]}[Value]
in
    df_tweets1

Thank you.

 

 

How to Create Date Parameters in Direct query

$
0
0

Hi Team,

 

I'm want to restrict the data to the users. So, i have created a Date parameter wherein user have to select Start date and End Date in Power bi service. 

 

I have created below M Langauage and pasted in Advance Editor
Next I have Created two Parameters Param1 and Param2

 

let
SQLSOURCE=(Param1 as date, Param2 as date)=>
let
Param1=Date.ToText(Param1,"MM")&"/"&Date.ToText(Param1,"dd")&"/"&Date.ToText(Param1,"yyyy"),
Param2=Date.ToText(Param2,"MM")&"/"&Date.ToText(Param2,"dd")&"/"&Date.ToText(Param2,"yyyy"),
Source=Sql.Database("sqllink","Database",
[Query="Select Column1,Column1,Date_Txt from (SELECT Column1,Column2,LEFT(CONVERT(VARCHAR, Date_N, 120), 10) as Date_Txt FROM dbo.Transform )a
where Date_Txt >='"&Param1&"' AND Date_Txt <='"&Param2 & "'"])
in
Source
in
SQLSOURCE


When i run the query i am not getting any results.

Please guide me how to create parameters in date level and add in power bi dataset.

 

Thank you
Ravi

Get data from VSTS

$
0
0

VSTS.PNGVSTS Task Definition, i.e. EffortWhat data can I import from VSTS ?  We use EPIC, USE CASE, TASK, etc. very extensively in our Software Engineering, how can I find out what data i can import into Power BI Desktop?  For example when looking at a TASK in VSTS there are Effort values, Orignal Estimate, Remaining, and Completed.  Where can this information be found please?


SSAS Tabular 2017 Oauth2 Credential Refresh

$
0
0

I have an SSAS 2017 Tabular model hosted on prem. It is pulling data from the Dynamics 365 OData feed and using OAuth2. The problem i am having is that one authenticated, OAuth2 issues an access token and it expires after an hour. So, I'm able to automate processing of hte model using SQL Agent for 1 hour, and then everything fails. Can anyone help with how to automate the refresh of credentials or whether that is possible with SSAS 2017 on prem?

R visual error in latest update August 2019

$
0
0

Dear Community,

 

I've had no problems with the R-visuals until the update of Power BI August 2019.

 

I've the following error in Power BI Cloud using a R-visual:

Attaching package: 'dplyr' The following objects are masked from 'package:stats': filter, lag The following objects are masked from 'package:base': intersect, setdiff, setequal, union Attaching package: 'psych' The following objects are masked from 'package:ggplot2': %+%, alpha Attaching package: 'magrittr' The following object is masked from 'package:tidyr': extract Error: Can't subset with `[` using an object of class NULL. Call `rlang::last_error()` to see a backtrace  

 

The R-visuals all work in the Power BI Desktop but when I publish the report to the cloud the above error message appears for 1 specific visual. This happened since installing the new update of Power BI August 2019. I have already reinstalled Power BI August 2019 version and removed all the NULL-values in the dataset.

 

See the R-script below:

# De volgende code voor het maken van een gegevensframe en het verwijderen van dubbele rijen wordt altijd uitgevoerd en fungeert als een preamble voor het script: 

# dataset <- data.frame(ID, Activity, EventTime, Attribute, #Cost)
# dataset <- unique(dataset)

# Plak of typ uw scriptcode hier:
list.of.packages <- c("tidyr", "dplyr", "ggplot2", "psych", "magrittr", "ggpubr")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)

library(tidyr)
library(dplyr)
library(ggplot2)
library(psych)
library(magrittr)
library(ggpubr)

dataset <- data.frame(dataset$ID, dataset$Activity, dataset$EventTime, dataset$Shift, dataset$'#Cost')
dataset <- unique(dataset)

dataset$dataset.Attribute<- as.character(dataset$dataset.Attribute)
dataset$dataset...Cost. <- as.numeric(dataset$dataset...Cost.)

ggdensity(dataset, x = "dataset...Cost.", add = "mean", 
          rug = TRUE, color = "dataset.Attribute", fill = "dataset.Attribute")

Can someone help me solving this issue?

Re: Images not loading in Chiclet slicers

$
0
0

Does the image show up whenever you publish the report? Have you tried changing the data category of the URL column to 'Web URL'? 

Re: Embed Token API Error: Creating embed token with multiple identities is not supported

$
0
0

Hi,

 

I got the same error and contacted the Microsoft Power BI support team and they helped me out. Turns out there was something wrong with my request.

 

I'm creating an App owns data web application in Python Django and this is what works for me. 

import requests
import json

username = '...'
password = '...'
client_id = '...'
report_id = '...'
group_id = '...'
dataset_id = '...'
settings = {
            "accessLevel": "View",
            "identities": [
                {
                "username": "Andrew Ma",
                "roles": [ "Manager" ],
                "datasets": [ dataset_id ]
                }
            ]
        }

data = {
    'grant_type': 'password',
    'scope': 'openid',
    'resource': r'https://analysis.windows.net/powerbi/api',
    'client_id': client_id,
    'username': username,
    'password': password
}
# Get access token
response = requests.post('https://login.microsoftonline.com/common/oauth2/token', data=data)
print(response.content)
access_token = response.json().get('access_token')

# Get embed token
dest = 'https://api.powerbi.com/v1.0/myorg/groups/' + group_id \
    + '/reports/' + report_id + '/GenerateToken'
embed_url = 'https://app.powerbi.com/reportEmbed?reportId=' \
    + report_id + '&groupId=' + group_id
headers = {'Authorization': 'Bearer ' + access_token, 'Content-Type': 'application/json'}
response = requests.post(dest, json=settings, headers=headers)
print(response.content)
embed_token = response.json().get('token')
print(embed_token)

Turns out I forgot to add the Content-Type: application/json to the request headers. Also, my settings weren't formatted as json in the request.

 

Hope this helps you out.

 

Regards

Re: Power BI Embedded - RLS REST API ERROR: Creating embed token with multiple identities

Connect with Dynamics 365 system view from Paginated Report Builder or AAS

$
0
0

Hi,

 

I am trying to extract and display the Dynamic 365 (services) system views and display in Power BI Paginated report bulider and then schedule it as pdf. But I am unable to figure out any way to the views in AAS or in Power BI Paginated report bulider. I can get the fetchxmal from savedquery table, but then how to automatically execute that fetchxml to get the report.

 

Please advice if there is any complex approach. If I can use any API for this.


Please help.

Regards,

Avijit

Re: Get data from VSTS


Re: Images not loading in Chiclet slicers

$
0
0

Hi there, many thanks for the response back.

 

Sorry I neglected to mentioned I did set to use url, and have tried publishing and image still does not load.

 

I did try another PBi visual, named Image Grid, and I am still experiencing the same issue.  I feel it is more a user error on my end.

Re: Embedded reports or dashboards with alerts and notifications

$
0
0

I am currently in the same boat as you with this road block. It looks like there are possibly some solutions in azure that would achieve the result but it seems like it will be cumbersome for us to set up and maintain in the long run . Did you ever find something with the embedded api that will allow access to the alerts feature? 

Re: Get data from VSTS

$
0
0

Thank you very much,  i will read over this today and give it a go.  I'll update here once I look at this today.

 

Best Regards

CHS

matrix selection error on other visual

$
0
0

hi power bi community

 

i try create selection with my matrix custom visual, but that make error on other visual

this is my transform, using builder withMatrixNode

 

function visualTransform(options: VisualUpdateOptions, host: IVisualHost): DataViewModel {

    let dataViews = options.dataViews[0];
    var rows = dataViews.matrix.rows;
    let listSelectionId: DataListSelection[] = [];
    let selectionIdBuilder = host.createSelectionIdBuilder();

    rows.root.children.forEach(x => {
        listSelectionId.push({
            value: x.value,
            selectionId: selectionIdBuilder.withMatrixNode(x, rows.levels).createSelectionId()
        });

        if (x.children)
            x.children.forEach(z => {
                listSelectionId.push({
                    value: z.value,
                    selectionId: selectionIdBuilder.withMatrixNode(z, rows.levels).createSelectionId()
                });
                if (z.children)
                    z.children.forEach(a => {
                        listSelectionId.push({
                            value: a.value,
                            selectionId: selectionIdBuilder.withMatrixNode(a, rows.levels).createSelectionId()
                        });

                    })
            })
    });
    return {
        dataPoints: listSelectionId
    }
}

I'm already add click listener to get selection Id and make it selected in manager, and this is the console log

 

c-selection.PNG

 

but but my page always got error in other visual:

c-selection-2.PNG

 

what wrong with my selection code?

 

and one more question, I'm already declare selectcallback in my manager but never called when other visual make selection

        this.selectionManager = this.host.createSelectionManager();
        console.log('constructor allow interaction', this.host.allowInteractions);
        this.selectionManager.registerOnSelectCallback(() => {
            console.log('selection manager callback', this.selectionManager.getSelectionIds());
        });
        this.selectionIdBuilder = options.host.createSelectionIdBuilder();

please help, I'm already strugling with this for 3 days

Using cmdlets to change SSAS connection in report

$
0
0

Hello World!

I need a feature which I think isn't available, but I might be wrong.

I want to use the Power BI cmdlets to repoint the datasource to a different database in the SQL Server Analysis Services.

What I want to do is this:

1. Use the cmdlets to import the Power BI reports from the Dev App Workspace to a local temp folder.

2. Repoint the Reports from Dev to Test database.

3. Export the reports to the Test App Workspace.

 

The resources for points 1 and 3 were available in the forum and I was able to do it. I need point 2 because parameterization is not supported for Live connections. Is Point 2 possible in Powershell? Is there any other way to make this work?

 

Thanks

Viewing all 48084 articles
Browse latest View live


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