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

Import data using Cliniko API

$
0
0

Hello, 

 

I want to fetch data from Cliniko using it's API documented in the link: https://github.com/redguava/cliniko-api.

But I am unable to fetch and facing issues regarding Authentication(I am using free trial account).

Please guide me if anyone knows how to import data from Cliniko to Power BI.

 

Also, I have query regarding the response. The link mentioned above states that the JSON response of the appointments API will be as follows:

{
  "id": 1,
  "created_at": "2016-07-11T18:26:36Z",
  "updated_at": "2016-07-11T18:26:43Z",
  "conflicts": {
    "links": {
      "self": "https://api.cliniko.com/v1/group_appointments/1/conflicts"
    }
  },
  "max_attendees": 13,
  "notes": null,
  "patient_ids": [48],
  "repeat_rule": {},
  "repeats": null,
  "deleted_at": null,
  "starts_at": "2016-07-13T03:45:00Z",
  "ends_at": "2016-07-13T04:15:00Z",
  "appointment_type": {
    "links": {
      "self": "https://api.cliniko.com/v1/appointment_types/7"
    }
  },
  "business": {
    "links": {
      "self": "https://api.cliniko.com/v1/businesses/1"
    }
  },
  "practitioner": {
    "links": {
      "self": "https://api.cliniko.com/v1/practitioners/1"
    }
  },
  "attendees": {
    "links": {
      "self": "https://api.cliniko.com/v1/group_appointments/1/attendees"
    }
  },
  "links": {
    "self": "https://api.cliniko.com/v1/group_appointments/1"
  }
}

So, if we import appointments, it expands the following as business, practitioner, attendees, links by itself or do we need to manually do anything? Please guide if anyone knows how this works.

 

Thanks in advance.

 


Issue within the iFrame when Chiclets are used in the report

$
0
0

Hi Experts,

Need your help in this.

We have integrated Power BI reports in Drupal based website using Java Script API. Within the iFrame, when we use keyboard to access different components/visuals in the report, it works fine. But if there is a Chiclet - custom visual in the reports, we can not render between the chiclets using keyboard Tab or any other shorcuts.

Is it a limitation with Chiclets or there is a way to do it.

Thanks.

 

Unselecting options of slicer after clicked to Select all option is giving empty chart

$
0
0

Hi ,
I click on Select all option than uncheck all options but 'Select all' option is still selected and i see empty chart . I think when i uncheck all options , 'Select all' option should be unselected automatically and i should see the chart like not applied any filter.
Please take a look to below gif.

slicer-options.gif

Unable to enter values into Text Filter and Attribute Slicer

$
0
0

The Text Filter and Attribute slicer are not working in browser, on IE, Edge and Chrome for a subset of users.

 

They simply refuse to allow some users to type anything or paste values. It was working fine last week. What is weirder is that it has stopped working on Reports that haven't been updated in months.

 

There is nothing special about these users accounts or security levels. The Filter and Slicer both have a little 'i' above them indicating "Too Many....values. Not Displaying all data. Filter the data or choose another field.". But it has always said this.

 

This seems to have conincided with some users upgrading from Windows 7 to Windows 10. Although I've always had Windows 10 and it'd always worked.

 

Could it be a JavaScript issue? Stopping users inputting data? I'm really at a loss to what is causing it as there seems to be no common thread between any user and if it is working or not for them.

 

Apply Slicer on Report Load

$
0
0

I have an embed Bi report.    I need to preset a filter on the report.    I can get this working when I run the first piece of code AFTER the report has finished loading.   I need this to be done before so that the filter is pre applied.  I have tried following the instructions and appeding the slicers to my initial config using the second peice of code but it does not work.

2019-04-29 10_57_28-GmsGraphs.png

setFilter1() {
    this.biReport.getPages()
      .then(function (pages) {
        var firstPage = pages[1];
        firstPage.getVisuals()
          .then(function (visuals) {
            let visual = visuals.filter(x => x.title === 'Current/Previous Month')[0];
            if (visual) {
              const basicFilter = {
                $schema: 'http://powerbi.com/product/schema#basic',
                target: {
                  table: 'WorkOrdersView',
                  column: 'Current/PreviousMonth'
                },
                operator: 'In',
                values: ['Current Month'],
                filterType: pbi.models.FilterType.Basic
              };
              visual.getSlicerState().then(slicer => {
                slicer.filters = [];
                visual.setSlicerState({
                  filters: [basicFilter]
                }).then(s => {
                  this.myslicers = s;
                }).catch(errors => {
                  console.log(errors);
                });
              });
            }
          });
      });
  }
 slicers = [
    {
      selector: {
        $schema: 'http://powerbi.com/product/schema#visualSelector',
        visualName: 'c21a3d6790798afcfb8c'
      },
      filters: [
        {
          $schema: 'http://powerbi.com/product/schema#basic',
          target: {
            table: 'WorkOrdersView',
            column: 'Current/PreviousMonth'
          },
          operator: 'In',
          values: ['Current Month']
        }
      ]
    }
  ];
  embedConfig = {
    type: 'report',
    id: '',
    slicers: [this.slicers],
    embedUrl: '',
    tokenType: pbi.models.TokenType.Embed,
    accessToken: ''
  };

 

Custom Visual - Not able to run

$
0
0

Hi all,

I am trying to run the install and run the LineDotChart by Microsoft, but without success. 

When npm install I get the following error messages: 

npm WARN tar ENOENT: no such file or directory, open 'C:\Users\........\otravez\node_modules\.staging\typedarray-f3f8b705\package.json'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\........\otravez\node_modules\.staging\type-is-7846aae4\package.json'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\........\otravez\node_modules\.staging\typedarray-f3f8b705\LICENSE'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\........\otravez\node_modules\.staging\type-is-7846aae4\HISTORY.md'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\........\otravez\node_modules\.staging\typedarray-f3f8b705\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\........\otravez\node_modules\.staging\type-is-7846aae4\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\........\otravez\node_modules\.staging\type-is-7846aae4\LICENSE'
.
.
.
[Much more rows like this...]
.
.
.
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\........\otravez\node_modules\.staging\tslint-286165b1\lib\rules\completed-docs\exclusionFactory.d.ts'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\........\otravez\node_modules\.staging\tslint-286165b1\lib\rules\completed-docs\exclusionFactory.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\........\otravez\node_modules\.staging\tslint-286165b1\lib\rules\completed-docs\tagExclusion.d.ts'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\........\otravez\node_modules\.staging\tslint-286165b1\lib\rules\completed-docs\tagExclusion.js'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\........\otravez\node_modules\.staging\less-0a1e8cab\test\less-bom\errors'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\........\otravez\node_modules\.staging\less-0a1e8cab\test'
npm ERR! path C:\Users\........\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\cd\02\0c3a60bedfbda90bf08254baa7434cd206263b1c7a1d53b9a941d8e265d75e93818c8f7d48ddd509ee002cf68eb95fb9a74666ba3a890e91ce9ff638df06
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall lstat
npm ERR! Error: EPERM: operation not permitted, lstat 'C:\Users\........\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\cd\02\0c3a60bedfbda90bf08254baa7434cd206263b1c7a1d53b9a941d8e265d75e93818c8f7d48ddd509ee002cf68eb95fb9a74666ba3a890e91ce9ff638df06'
npm ERR!  { Error: EPERM: operation not permitted, lstat 'C:\Users\........\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\cd\02\0c3a60bedfbda90bf08254baa7434cd206263b1c7a1d53b9a941d8e265d75e93818c8f7d48ddd509ee002cf68eb95fb9a74666ba3a890e91ce9ff638df06'
npm ERR!   cause:
npm ERR!    { Error: EPERM: operation not permitted, lstat 'C:\Users\........\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\cd\02\0c3a60bedfbda90bf08254baa7434cd206263b1c7a1d53b9a941d8e265d75e93818c8f7d48ddd509ee002cf68eb95fb9a74666ba3a890e91ce9ff638df06'
npm ERR!      errno: -4048,
npm ERR!      code: 'EPERM',
npm ERR!      syscall: 'lstat',
npm ERR!      path: 'C:\\Users\\........\\AppData\\Roaming\\npm-cache\\_cacache\\content-v2\\sha512\\cd\\02\\0c3a60bedfbda90bf08254baa7434cd206263b1c7a1d53b9a941d8e265d75e93818c8f7d48ddd509ee002cf68eb95fb9a74666ba3a890e91ce9ff638df06' },
npm ERR!   stack: 'Error: EPERM: operation not permitted, lstat \'C:\\Users\\........\\AppData\\Roaming\\npm-cache\\_cacache\\content-v2\\sha512\\cd\\02\\0c3a60bedfbda90bf08254baa7434cd206263b1c7a1d53b9a941d8e265d75e93818c8f7d48ddd509ee002cf68eb95fb9a74666ba3a890e91ce9ff638df06\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'lstat',
npm ERR!   path: 'C:\\Users\\........\\AppData\\Roaming\\npm-cache\\_cacache\\content-v2\\sha512\\cd\\02\\0c3a60bedfbda90bf08254baa7434cd206263b1c7a1d53b9a941d8e265d75e93818c8f7d48ddd509ee002cf68eb95fb9a74666ba3a890e91ce9ff638df06',
npm ERR!   parent: 'otravez' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\........\AppData\Roaming\npm-cache\_logs\2019-05-02T06_45_04_871Z-debug.log

 

Then if I try to pbiviz start:

error UNKNOWN TypeError: Path must be a string. Received undefined
at assertPath (path.js:28:11)
at VisualPackage.join (path.js:489:7)
at VisualPackage.buildPath (C:\Users\........\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\lib\VisualPackage.js:115:26)
at Promise (C:\Users\........\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\lib\LessCompiler.js:53:42)
at new Promise (<anonymous>)
at Function.build (C:\Users\........\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\lib\LessCompiler.js:52:16)
at _validateApiVersion.then (C:\Users\........\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\lib\VisualBuilder.js:100:38)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
at Function.Module.runMain (module.js:695:11)

 

If I download another custom visual from the Microsoft Git, and do the same steps as above, it works perfect. Could anyone help me with resolving this issue for the LineDotChart visual? Maybe I am doing something wrong?

REST API: Using the Power BI Service API (aka Power BI REST API), what can develop do to a dataset?

$
0
0

Using the Power BI Service API (aka Power BI REST API), what can develop do to a dataset?

 

Can create a new dataset?

Can add rows to an existing dataset?

Can refresh an imported dataset?

Can retrive rows from an existing dataset?

 

Retrieving a Power BI report/table as a Python DataFrame

$
0
0

Hello All,

 

I'm trying to get a Power BI Report/Table as a Python DataFrame so that I can perform some data processing at Python. Is this possible by utilizing the REST API? I've registered App on Azure and I have AppID and Secret. Appreciate any guidance. TIA


Power BI Javascript - report.setFilters() functionality issue

$
0
0

Current Implementation:

We have a report embedded in a web application with the help of Power BI Javascript. This report has some pre-defined report level filters including a filter on date-range.

Our web-application provides a date-picker for altering the date-range on which the report data needs to be displayed. So, the functionality that is implemented in web-application is as follows:

 - Filters already available to report is fetched using getFilters().

 - Previous Date filter from the list of filters is removed. 

 - New date filter is added in the list.

 - The updated list is passed as a parameter in setFilters() function.

 

Issue:

This functionality works fine when a new date range is selected. However, when the same date range is selected and user calls the setFilters(), the report does not get refreshed with new data on that range.

 

When a user clicks on a button to call setFilters() with the filters list same as the previous one, does the report data get refreshed?

 

I have also tried to call report.refresh() while applying the date filter. Please suggest if this seems to be the right approach or not.

 

Thanks for the response in advance.

Question on building Dimension table

$
0
0

I'm trying to create Aggregate Dimension for Power BI, I'm not sure this is the right forum, but a question for development of the Aggregate Dimension.

I have a Date Dimension with one of the attribute is Month.

image.png

 

Question is in that property OrderBy there are 4 options :

  • Key
  • Name
  • Attribute Key
  • Attribute Name

The default is Name, but if I change to Key, what key exactly it referring to ? Is it the underlying table's Key ? what if there are multiple keys, how we select which key.

 

Because currently when I'm using this Aggregate Dimension in Power BI, the month is sort by its name, not by the month number. And there is limitation whereby Power BI cannot support Sort By another column for Direct Query, so  must do it in SSAS

 

Thanks,

R visuals supported by which of them? and difference between R Visuals and Custom R Visuals

$
0
0

Hi Guys,

 

R visuals supported by which of them?

  1. Power Bi Poertal
  2. Publish to Web
  3. Reports hosted on Power BI Embeded (v2)
  4. Power BI Mobile App ( for reports hosted on app.powerbi.com)
  5. Power BI Desktop
  6. Power BI Report Server

Also can pls explain difference between R Visuals and Custom R Visuals?

Actualización de conjunto de datos con Powershell

$
0
0

Hola comunidad,

 

He estado incursionando en distintas webs que indican varios métodos para actualizar mi conjunto de datos en Power BI mediante Powershell; sin embargo, el código me compila sin ningún problema, pero, no veo resultados de actualización en el conjunto de mis datos. Les agradecería bastante que me indiquen qué me falta dentro del código que haga que no me actualice la información.

 

Para mayor detalle estoy usando este modelo de código:

 

PBI.jpg

How to developer a powerbi app

$
0
0

Hello,

 

My company tries to creat an "application" which works not only in our organisation but also for other clients, like the ones in Powerbi app store.

 

Capture.PNG

But I did't find any resources about how to developer un pwerbi app.

Can anyone tell me if it's possible to get the permit to developer a power bi apps ?

 

Thanks,

Power Bi Embedded customData, can we pass null role?

$
0
0

we are using below method, and pass null as role and custom data as user value; but it fails with bad request and does it work only using azure analysis server role?

 

publicEffectiveIdentity(string username, IList<string> datasets, IList<string> roles = null, string customData = null);

 

sample app have this note

 Comma separeted roles, optional for SSAS, mandatory for roles defined in pbix 

Custom Visual Won't Display

$
0
0

I've installed everything for creating custom visuals, as the "Update: X" visual displays properly. However, when trying to display a visual with static data, the visual is blank. I have added values to both Category & Measure field wells.

 

The code I'm using is the static bar chart: https://github.com/Microsoft/PowerBI-visuals-sampleBarChart/blob/master/Tutorial/StaticVisual.md

 

Screen Shot 2019-05-04 at 7.13.45 AM.pngScreen Shot 2019-05-04 at 7.13.20 AM.png

 

Code:

 
/*
 *  Power BI Visual CLI
 *
 *  Copyright (c) Microsoft Corporation
 *  All rights reserved.
 *  MIT License
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the ""Software""), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in
 *  all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 *  THE SOFTWARE.
 */

module powerbi.extensibility.visual {

    interface dataPoint {
        category: string;
        value: number;
    }

    interface ViewModel {
        dataPoints: dataPoint[];
        maxValue: number;
    };

    "use strict";
    export class Visual implements IVisual {
        private host: IVisualHost;
        private svg: d3.Selection<SVGElement>;
        private barGroup: d3.Selection<SVGElement>;
        private xPadding: number = 0.1;



        constructor(options: VisualConstructorOptions) {
                this.host = options.host;
                this.svg = d3.select(options.element)
                    .append("svg")
                    .classed("barchart", true);
                this.barGroup = this.svg
                .append("g")
                .classed("barGroup", true);


            
        }

        public update(options: VisualUpdateOptions) {
            let sample: dataPoint[] = [
                {category: 'apples', value: 5},
                {category: 'bananas', value: 10},
                {category: 'oranges', value: 15}
            ];

            let viewModel: ViewModel = {
                dataPoints: sample,
                maxValue: d3.max(sample, x => x.value)
            };

            let width = options.viewport.width;
            let height = options.viewport.height;

            this.svg.attr({
                width: width,
                height: height
            });

            let yScale = d3.scale.linear().domain([0, viewModel.maxValue]).range([height, 0]);
            let xScale = d3.scale.ordinal().domain(viewModel.dataPoints.map(d => d.category)).rangeRoundBands([0,width], this.xPadding);

            let bars = this.barGroup
                .selectAll(".bar")
                .data(viewModel.dataPoints);

            bars.enter()
                .append("rect")
                .classed("bar", true);

            bars.attr({
                width: xScale.rangeBand(),
                height: d => height - yScale(d.value),
                y: d => yScale(d.value),
                x: d => xScale(d.category)
            });

            bars.exit()
                .remove();

        };

 /** 
        private static parseSettings(dataView: DataView): VisualSettings {
            return VisualSettings.parse(dataView) as VisualSettings;
        }

       
         * This function gets called for each of the objects defined in the capabilities files and allows you to select which of the 
         * objects and properties you want to expose to the users in the property pane.
         * 
        
        public enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[] | VisualObjectInstanceEnumerationObject {
            return VisualSettings.enumerateObjectInstances(this.settings || VisualSettings.getDefault(), options);
        }
         */
    }
}
 

View Workspace as script

$
0
0

Hi

Is it possible to view somehow the Workspace that i have made as script/code, so if i wanted to do a copy for another client fast, i could easily use the script/code, change datasources there and copy to new place? Something like in Visual studio SSRS, where u can view the code.

How to copy dataset using PowerShell Script

$
0
0

Hi Team,

 

We are stuck in the below scenario, need to copy Report with Dataset from One workspace to Another.

 

We have tried below method but it works only if the Dataset already exists in Destination Workspace

 

1) Copy-PowerBIReport 

Copy-PowerBIReport -Name "Report_Copy_5" -Id $source_report_id -WorkspaceId $source_WorkspaceId -TargetWorkspaceId $target_WorkspaceId -TargetDatasetId $targetDatasetId

2) Export & Import option in Power BI API

  1. Export report in Group
    1. groupId -> Workspace Id
    2. reportId -> Report Id
  2. Import-Get Import in Group
    1. groupId -> Workspace Id
    2. importId -> This Import Id is not clear from where we get

Note: First Export report is not working as don't know how to store the PBIX output, second Import option won't work without importId which don't know from where to pass.

 

3) Clone report In Group

  1. groupId - > Workspace Id
  2. reportId - > Report Id
  3. Request Body
    1. targetModelId-> Target dataset id which assumes like dataset id available in Destination Workspace
    2. targetWorkspaceId -> Target Workspace id

Note: this clone report clone the report every time on the same Workspace

 

Requesting you to provide proper guidance on how to accomplish the task, please share the PowerShell code.

 

Thanks in advance,

Santosh Sawant 

Power BI Visual Tools v3 DataViewObjects

Import Excel File From SharePoint using Rest API

$
0
0

I've created a custom connector in Microsoft Flow to interface directly with Power BI using the Power BI OpenAPI definition.  https://github.com/Microsoft/PowerBI-CSharp/blob/master/sdk/swaggers/swaggerV2.json

 

I'm attempting to import an Excel file that sits in one of our SharePoint sites, but I'm having problems with the Post Import syntax.  Can anyone provide an example of how the body json should be constructed when Posting an Import?  I'm not sure which parameters need to be included and what the difference between filePath and fileURL as it relates to these parameters.

 

Any help getting this working would be much appreciated.  

 

 

"The column N of the table was not found"

$
0
0

I have grouped a column in edit quesry, when i click save and apply i get the an error message "The column N of the table was not found"

Viewing all 17927 articles
Browse latest View live


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