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

Custom visual matrix dataview sorting behavior

$
0
0

I have a custom visual that uses a matrix dataview. I have sorting set to ascending on a numeric column, but I am seeing odd behavior in the "sorted" dataset. The data is hierarchical, but the column being sorted on does not roll up to all levels of the hierarchy, as it is only applicable to the lowest level. 

In this case, I am sorting on the right-most column, StageOldAge.

odd_sorting.png

I would expect Jurassic to be above Triassic in this case becuse Tithonian (152.10) is less than Ladinian (242.0).

Not sure if this is because the StageOldAge column does not roll up in the hierarchy, and these values are blank. Sorting is respected at the lowest level of the hierarchy, but the order at the higher levels seems undefined.

Is this expected behavior? In this case I'm disabling user sorting and defining custom sorting in the visual.


Best way to connect to own cloud with Rest Api?

$
0
0

Hello,

we have a cloud solution where data is available through a Rest Api.

We tried to develop a custom connector for this, and it worked well from within Power BI Desktop. But it fell short on the limit that custom connectors cannot be set up for automatic refresh in Power BI services. And we'd rather not need to use a Gateway, as we have several different customers in our cloud solution - and we'd need one Gateway for each if I understand it correctly.

 

So I wonder: what would be the best way to set up a connection to create reports from this Api, that would support automatic refresh?

We would ideally like our tables to be selectable in full after the connection is made (i.e. we don't want one connection per table).

 

Do we need to support full OAuth for this?

Could using the OData connector help?

 

Thanks for any response.

Power BI Generate Token API Failure

$
0
0
Hi
We have created a MVC web API with embedded Power BI reports. We have also commissioned a Power BI dedicated capacity on Azure.  The app was being used successfully for the last 4 months - however we now have an API Failing - https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/GenerateToken
The flow of the Power BI API is as follows. 
https://login.microsoftonline.com/common/oauth2/token - Request an access token - POST Successful
https://api.powerbi.com/v1.0/myorg/groups - Get groups - GET Successful
https://api.powerbi.com/v1.0/myorg/groups/{group-Id}/reports - Get reports in a group - GET Successful
https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/GenerateToken - Generate Token for POWER BI Embed control - GET Fails.
The body passed for the GenerateToken function is
{
 "accessLevel": "View"
}
However the response is
{
    "error": {
        "code""Unauthorized",
        "message""User is not authorized"
    }
}
This was working for almost 3 months and we haevnt changed any permissions on the user. Infact we have as part of our testing/trouble shooting  efforts allocated all Power BI permissions in Azure Application setup.
I cant figure out what could have changed. Any directions as to where we should be looking/trouble shooting? Appreciate any help
Regards
Sid

Installing powerbi-visuals-tools runs into errors with deprecated

$
0
0

iHello,

I've installed nodejs, then trying to do the instruction

npm i -g powerbi-visuals-tools

But I'm getting some of these errors ...   Any suggestions ?

npm : npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 At line:1 char:1 + npm i -g powerbi-visuals-tools + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (npm WARN deprec...est/issues/3142:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError npm WARN deprecated core-js@2.3.0: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm

 

Powerbi on premises and OOS, filter url parameters

$
0
0

I have an installation with power bi on-premises and office online server also on-premises, both with the latest version. I have uploaded to power bi an excel workbook that includes a pivotable with two slicers and all working good. I have the below request and i need some help with this

"When a user sees the excel workbook from power bi server and office online a parameter value should be passed to filter the slicer inside workbook, the parameter value changes based on the user that sees the workbook. My problem is that i can't find a way to pass the parameter value inside excel. I know that with sharepoint and web parts is working, but in my case is not an option to install sharepoint, also i have tried to use power bi syntax for filter ?filter=table/column eq 'some value' but doesn't work either. 

Re: Open report using hyperlink in the same tab of a web browser

$
0
0

Naw.. nothing as yet.. nothing works. I guess the solution isn't ready as yet.

Query for SQL Tables

$
0
0

Hi,

 

For a dashboard for my dbo.audit table I have State_ID.  State_ID is also in my dbo.states table.  I'm looking to pull State_Name from my dbo.states.

 

What's the best way to perform this?

 

Thanks!

Update credentials using API after PostImportWithFileInGroup

$
0
0

Hi!
I am attempting to copy a PowerBI report & datasource that successfully connects to Azure Table & Blob data sources.

After retrieving the file with ExportReportInGroupWithHttpMessagesAsync() and posting back with PostImportWithFileInGroup(), I can see the file in the workspace.

Programatically calling RefreshDatasetInGroupAsync() fails however because the credentials for the datasources have not been copied as well? Is there a way to do this using the SDK and without resulting to manually calling the REST APIs?

 

I see threads like this https://community.powerbi.com/t5/Developer/Unable-to-update-dataset-credentials-after-uploading-a-pbix/td-p/235393 indicating the solution is to use the REST APIs but that's three years old.


Re: How to Hide Power BI iFrame Embedded Report Tabs

$
0
0

Add (concat) at the end of your PowerBi report URL:

&filterPaneEnabled=false&navContentPaneEnabled=false

Re: Storing dict outside of visual.ts

$
0
0

Thank you, it did have an issue with me trying to import './constants.ts' as it did not want the extension on there so './constants' did the job. I am not very familiar with javascript/node.js, best I do some reading up on it and learn the fundamentals. Thank you for the good explanation.

 

Brenton Collins

Re: Storing dict outside of visual.ts

$
0
0

Glad to hear it's working for you, and thanks for the feedback on the file extension - I'll update the answer with the correct info 🙂

Re: Custom Visual Tooltip Data Option

$
0
0

I am still having issues with getting my tooltips to display, I am sure it is how I have possibly implemented them in the visual.ts file?

 

"use strict"; import "core-js/stable"; import "../style/visual.less"; import powerbi from "powerbi-visuals-api"; import { dict } from './images'; import IVisual = powerbi.extensibility.IVisual; import VisualConstructorOptions = powerbi.extensibility.visual.VisualConstructorOptions; import VisualUpdateOptions = powerbi.extensibility.visual.VisualUpdateOptions; import EnumerateVisualObjectInstancesOptions = powerbi.EnumerateVisualObjectInstancesOptions; import VisualObjectInstanceEnumeration = powerbi.VisualObjectInstanceEnumeration; import IVisualHost = powerbi.extensibility.visual.IVisualHost; import DataView = powerbi.DataView; import VisualTooltipDataItem = powerbi.extensibility.VisualTooltipDataItem; import * as d3 from "d3"; import { TooltipEventArgs, TooltipEnabledDataPoint, createTooltipServiceWrapper, ITooltipServiceWrapper, } from 'powerbi-visuals-utils-tooltiputils' type Selection<T extends d3.BaseType> = d3.Selection<T, any, any, any>; export class Visual implements IVisual { private element: HTMLElement; private isLandingPageOn: boolean; private LandingPageRemoved: boolean; private host: IVisualHost; private svg: Selection<SVGElement>; private container: Selection<SVGElement>; private circle: Selection<SVGElement>; // Declare an array list for the line objects private lineOffset: Selection<SVGElement>; private arr = new Array(); private arrDots = new Array(); // Declare as array of integers to hold the segments of the circle private arrSegments = new Array(); private arrOffsetSegments = new Array(); private singleSegment: number; private categorys: number = 17; private CenterarrayOffset_ = new Array(); private CenterarrayOffset_bk = new Array(); private LandingPage: Selection<any>; virificationArray: string[]; private tooltipServiceWrapper: ITooltipServiceWrapper; constructor(options: VisualConstructorOptions) { this.element = options.element; this.svg = d3.select(options.element) .append('svg') .classed('circleCard', true); this.host = options.host; this.container = this.svg.append("g") .classed('container', true); } private static getTooltipData(value: any): VisualTooltipDataItem[] { return [{ displayName: value.category, value: value.value.toString(), color: value.color, header: 'ToolTip Title' }]; } private HandleLandingPage(options: VisualUpdateOptions) { console.log("landing") if(!options.dataViews || !options.dataViews.length) { if(!this.isLandingPageOn) { this.isLandingPageOn = true; const SampleLandingPage: Element = this.createSampleLandingPage(); this.element.appendChild(SampleLandingPage); this.LandingPage = d3.select(SampleLandingPage); } } else { if(this.isLandingPageOn && !this.LandingPageRemoved){ this.LandingPageRemoved = true; this.LandingPage.remove(); } } } private createSampleLandingPage(): Element { let div = document.createElement("div"); let header = document.createElement("h1") header.textContent = "Sample Bar Chart Landing Page"; header.setAttribute("class","LandingPage"); let p1 = document.createElement("a"); p1.setAttribute("class", "LandingPageHelpLink"); p1.textContent = "Learn more about Landing page"; div.appendChild(header); div.appendChild(p1); return div; } public update(options: VisualUpdateOptions) { let dataView_: DataView = options.dataViews[0]; // this.host.fetchMoreData(); let width: number = options.viewport.width; let height: number = options.viewport.height; this.svg.attr("width", width); this.svg.attr("height", height); let radius: number = Math.min(width, height) / 2.4; let radiusDot: number = Math.min(width, height) / 250; let centerOffset: number; let cX: number; let cY: number; let cX_: number; let cY_: number; let cXOffset: number; let cYOffset: number; let counter: number; let counter1: number; let entryCounter: number; let ccfvfColour: string; this.CenterarrayOffset_ = new Array(); this.CenterarrayOffset_bk = new Array(); this.virificationArray = new Array(); let colourCounter: number; let colourString: string; // To prevent from drawing everyting over and over again, remove all drawing and start again. this.svg.selectAll('circle').remove(); this.svg.selectAll('image').remove(); this.HandleLandingPage(options); entryCounter = 0 for (var j = 0; j < dataView_.table.rows.length; j++) { if ( this.virificationArray.indexOf(dataView_.table.rows[j].toString().split(",")[2]) > -1){ } else{ this.virificationArray.push(String(dataView_.table.rows[j].toString().split(",")[2])) } } this.circle = this.container.append("circle") .classed('circle', true); // Create the lines for the categorys to split the kelly wheel into 17 sections for (let i = 0; i < this.categorys; i++) { this.arr.push(this.container.append("line").classed("line_" + i, true)); } // Get the single segments of the kelly wheel in deg of 360 this.singleSegment = 360 / this.arr.length; for (var i = 0; i < this.arr.length; i++) { this.arrSegments.push(this.singleSegment * i) } for (var a = 0; a < this.virificationArray.length; a++) { this.arrDots[a] = new Array(); entryCounter = 0 for (var j = 0; j < dataView_.table.rows.length; j++) { if ( dataView_.table.rows[j].toString().split(",")[2] == this.virificationArray[a]) { entryCounter = entryCounter + 1 } } for (var i = 0; i < entryCounter; i++) { this.arrDots[a].push(this.container.append("circle").classed("circle__" + a + "_" + i, true)); } } /* * Get the edge of the circle */ this.circle .style("stroke", "black") .style("stroke-width", 2) .attr("r", radius) .attr("cx", width / 2) .attr("cy", height / 2) .style("fill", "#ffe500"); counter = 0 counter1 = 0 for (var i = 0; i < 17; i++) { cX = (width / 2) + radius * Math.cos(this.arrSegments[i] * Math.PI / 180); cY = (height / 2) + radius * Math.sin(this.arrSegments[i] * Math.PI / 180); cX_ = width / 2 - radius * Math.cos(this.arrSegments[i] ); cY_ = height / 2 - radius * Math.sin(this.arrSegments[i] ); centerOffset = 40; // outer offset cXOffset = (width / 2) + radius * Math.cos((this.arrSegments[i]) * Math.PI / 180); cYOffset = (height / 2) + radius * Math.sin(this.arrSegments[i] * Math.PI / 180); this.arr[i] .attr("x1", '50%') .attr("y1", '50%') .attr("x2", cX) .attr("y2", cY) .attr("stroke-width", 3) .attr("stroke", "black"); centerOffset = 0 // left right | up down | in out this.CenterarrayOffset_ = // First loop [[23, 4, .06], //1 [20, 13, .06], //2 [15, 19, .06], //3 [4, 22, .06], //4 [-3, 23, .06],//5 [-11, 20, .06],//6 [-18, 16, .06],//7 [-22, 6, .06],//8 [-22, -1, .06],//9 [-20, -9, .06],//10 [-14, -16, .06],//11 [-9, -20, .06],//12 [-1, -20, .06],//13 [7, -20, .06],//14 [13, -17, .06],//15 [18, -11, .06],//16 [22, -3, .06]]//17 for (var z = 0; z < this.arrDots[counter].length; z++) { if(z >=138){ // Max 138 per FV section continue } colourCounter = 0 for (var j = 0; j < dataView_.table.rows.length; j++) { // console.log(this.virificationArray[a]) if ( dataView_.table.rows[j].toString().split(",")[2] == this.virificationArray[i]) { colourCounter = colourCounter + 1 } if (colourCounter == z) { colourString = dataView_.table.rows[j].toString().split(",")[1] } } if (colourString == "Yes") { ccfvfColour = "green" } else { ccfvfColour = "red" } this.arrDots[i][z] .style("fill", ccfvfColour) .style("stroke", ccfvfColour) .style("stroke-width", 2) .attr("r", radiusDot) .attr("cx", (this.CenterarrayOffset_[counter1][2] + centerOffset) * (cXOffset - (width / 2) + this.CenterarrayOffset_[counter1][0]) + (width / 2) + this.CenterarrayOffset_[counter1][0]) .attr("cy", (this.CenterarrayOffset_[counter1][2] + centerOffset) * (cYOffset - (height / 2) + this.CenterarrayOffset_[counter1][1]) + (height / 2) + this.CenterarrayOffset_[counter1][1]) ; centerOffset = (radius / 800000) + centerOffset + 0.025 if(z == 0){ this.CenterarrayOffset_bk = [ [15, 10, .48], //1 [0, 20, .48], //2 [-15, 22, .48], //3 [-30, 23, .48], //4 [-40, 12, .48],//5 [-44, 3, .48],//6 [-48, -12, .48],//7 [-47, -27, .48],//8 [-45, -37, .48],//9 6 [-35, -45, .48],//10 [-20, -53, .48],//11 [-10, -50, .48],//12 [6, -45, .48],//13 [15, -38, .48],//14 [24, -28, .48],//15 [36, -18, .48],//16 [40, -8, .48]] this.container.append("svg:image") .attr("xlink:href",dict[this.virificationArray[i]]) .attr("x", (.9 + centerOffset) * (cXOffset - (width / 2) + this.CenterarrayOffset_bk[counter1][0]) + (width / 2) + this.CenterarrayOffset_bk[counter1][0]) .attr("y", (.9 + centerOffset) * (cYOffset - (height / 2) + this.CenterarrayOffset_bk[counter1][1]) + (height / 2) + this.CenterarrayOffset_bk[counter1][1]). attr("width", 50) .attr("height", 50);; } if (z == 29) { centerOffset = 0 this.CenterarrayOffset_ = [ [28, 12, .08], //1 [20, 22, .08], //2 [13, 29, .08], //3 [0, 31, .08], //4 [-10, 28, .08],//5 [-19, 22, .08],//6 [-27, 15, .08],//7 [-30, 2, .08],//8 [-28, -8, .08],//9 [-23, -18, .08],//10 2 [-15, -25, .08],//11 [-7, -28, .08],//12 [5, -27, .08],//13 [14, -24, .08],//14 [22, -19, .08],//15 [28, -9, .08],//16 [30, 2, .08]] } if (z == 58) { //- left right +|- up down +| in out centerOffset = 0 this.CenterarrayOffset_ = [ [28, 19, .18], //1 [19, 30, .18], //2 [5, 32, .18], //3 [-7, 31, .18], //4 [-17, 28, .18],//5 [-27, 21, .18],//6 [-33, 9, .18],//7 3 [-34, -3, .18],//8 [-28, -15, .18],//9 [-25, -27, .18],//10 [-14, -33, .18],//11 [1, -30, .18],//12 [11, -27, .18],//13 [22, -24, .18],//14 [28, -15, .18],//15 [32, -3, .18],//16 [30, 9, .18]] } if (z == 82) { //- left right +|- up down +| in out centerOffset = 0 this.CenterarrayOffset_ = [ [28, 26, .26], //1 [17, 37, .26], //2 [-2, 36, .26], //3 [-14, 32, .26], //4 [-25, 28, .26],//5 [-35, 20, .26],//6 [-39, 5, .26],//7 [-39, -9, .26],//8 4 [-28, -22, .26],//9 [-23, -35, .26],//10 [-10, -39, .26],//11 [7, -34, .26],//12 [18, -27, .26],//13 [28, -18, .26],//14 [34, -10, .26],//15 [36, 3, .26],//16 [30, 16, .26]] } if (z == 102) { //- left right +|- up down +| in out centerOffset = 0 this.CenterarrayOffset_ = [ [19, 33, .39], //1 [6, 40, .39], //2 [-9, 40, .39], //3 [-22, 31, .39], //4 [-33, 22, .39],//5 [-38, 9, .39],//6 [-40, -5, .39],//7 [-32, -20, .39],//8 [-25, -30, .39],//9 [-12, -39, .39],//10 [1, -39, .39],//11 [16, -33, .39],//12 5 [26, -25, .39],//13 [34, -16, .39],//14 [35, 1, .39],//15 [36, 12, .39],//16 [30, 24, .39]] } if (z == 120) { //- left right +|- up down +| in out centerOffset = 0 this.CenterarrayOffset_ = [ [17, 40, .54], //1 [0, 45, .54], //2 [-15, 43, .54], //3 [-30, 31, .54], //4 [-40, 21, .54],//5 [-44, 6, .54],//6 [-43, -12, .54],//7 [-33, -27, .54],//8 [-25, -37, .54],//9 6 [-10, -45, .54],//10 [9, -41, .54],//11 [24, -33, .54],//12 [33, -25, .54],//13 [40, -12, .54],//14 [41, 5, .54],//15 [36, 20, .54],//16 [30, 31, .54]] } if (z == 132) { //- left right +|- up down +| in out centerOffset = 0 this.CenterarrayOffset_ = [ [15, 47, .70], //1 [-4, 50, .70], //2 [-23, 43, .63], //3 [-37, 31, .63], //4 [-47, 21, .63],//5 [-50, 3, .63],//6 [-43, -21, .63],//7 7 [-37, -32, .63],//8 [-21, -44, .63],//9 [-4, -50, .63],//10 [15, -45, .63],//11 [31, -34, .63],//12 [40, -24, .63],//13 [46, -8, .63],//14 [47, 8, .63],//15 [35, 28, .63],//16 [30, 38, .63]] } if (z == 152) { //- left right +|- up down +| in out centerOffset = 0 this.CenterarrayOffset_ = [ [11, 52, .80], //1 [-11, 53, .80], //2 [-29, 45, .80], //3 [-43, 31, .80], //4 [-53, 16, .80],//5 [-53, -5, .80],//6 [-47, -25, .80],//7 [-35, -40, .80],//8 [-21, -50, .80],//9 [0, -55, .80],//10 8 [18, -50, .80],//11 [36, -37, .80],//12 [47, -24, .80],//13 [52, -6, .80],//14 [50, 14, .80],//15 [40, 31, .80],//16 [30, 44, .80]] } if (z == 140) { // left right | up down | in out centerOffset = 0 // Get the remainder of CCFV and add a number to the end of the column } } this.svg.selectAll("line").raise() counter = counter + 1 counter1 = counter1 + 1 } this.tooltipServiceWrapper.addTooltip(this.svg.selectAll('circle'), (tooltipEvent: TooltipEventArgs<number>) => Visual.getTooltipData(tooltipEvent.data), (tooltipEvent: TooltipEventArgs<number>) => null); this.arrDots = [] this.arr = [] } }

Re: Custom Data Connector Navigation Table Functions

$
0
0

I see you managed to get some sort of solution to this problem.  I wonder if you would be able to provide some pointers in how you solved it.  

 

I am having the same issue for a custom connector i am working on.  I have a number of functions that take different parameters and i would like to expose them via the navigation table.  I can get it to work if they don't require parameters from the user but i can't work out how to allow them to enter anything.   If i mock up something that auto-generates the Navigation table they appear as expected but unfortunately this isn't really an option for what i need to do.

Custom Visual Web Page

$
0
0

Hello,

 

I would like to create a Visual that just displays a web-page. The Url would be data driven.

As I'm a complkete TypeScript newbie I would first like to inform if this would be possible ?

 

Kind regards, Harry

Re: Custom Visual Tooltip Data Option

$
0
0

Update:

I ended up getting it sorted, I added each object as they were made in a loop as such.

 

let dot = this.arrDots[i][z] .style("fill", ccfvfColour) .style("stroke", ccfvfColour) .style("stroke-width", 2) .attr("r", radiusDot) .attr("cx", (this.CenterarrayOffset_[counter1][2] + centerOffset) * (cXOffset - (width / 2) + this.CenterarrayOffset_[counter1][0]) + (width / 2) + this.CenterarrayOffset_[counter1][0]) .attr("cy", (this.CenterarrayOffset_[counter1][2] + centerOffset) * (cYOffset - (height / 2) + this.CenterarrayOffset_[counter1][1]) + (height / 2) + this.CenterarrayOffset_[counter1][1]) this.tooltipServiceWrapper.addTooltip(dot, (tooltipEvent: TooltipEventArgs<number>) => this.getTooltipData(tooltipEvent.data), (tooltipEvent: TooltipEventArgs<number>) => null // Get the remainder of CCFV and add a number to the end of the column )

 Thank You 


Is Power BI Report Builder generates logs?

$
0
0

Hi,

 

I am creating a Paginated report using Power BI Report Builder. While running report I am getting some errors so I was just want to know if the Report builder generates run time logs or not. I searched the installed folder but I am not able to find anything there. 

Please, someone, help me with this.

 

 

Remove spikes from data

$
0
0

 

Hello everyone!

 

To be honest I am not sure what I am asking is even possible in Power BI but I thought I would ask. So I have the graph shown below with some avg runtime data. But you can see that before and after the two main runs (which hopefully you can identify) there are some random spikes that in order to get some valid min/max information, they would have to be removed.

What I thought is, creating some sort of script in Python that removes those spikes or replaces them with 0s but I don't know if thats possible inside Power BI. At the moment, it would be really hard to manipulate the data externally so if you have any ideas, it would be much appreciated. Thank you!

 

graph.png

 
 
 

How to make filter work in embed report in CRM using text type column

$
0
0

We have embedded a report in CRM using secured embed code. We need to filter a customer in a report based on the selected customer is CRM. This worked fine, when we first had a customer column in Power BI as numeric type. But when column type was changed to text, filtering doesn't work anymore. How should we change the filter definition to make it work with text type column? Filter is added using json.

{"Filter": "[{\"$schema\":\"basic\",\"target\":{\"table\":\"VIEW_D_CUSTOMER\",\"column\":\"CUSTOMER_ID\"},\"operator\":\"In\",\"values\":[$a],\"filterType\":1}]","Alias": {"$a": "accountnumber"}}




New filter experience: filter pane will not hide

$
0
0

Several Power BI reports embedded in an iframe on my organisation's website have the filter pane visible. These reports do not have the filter pane visible in the published versions on the service, and the filter pane is hidden in the desktop versions. Is there a setting to enable the filter pane to hide following the May 2020 update?

Remove only one filter while calculating a measure

$
0
0

Hi All,

I am facing an issue with the measure that needs to be calculated at group level (grouping as in SQL).

I have a measure called [Total Number of visits for Serving Unit with both WS and WS MH] which needs to be calculated depending upon below conditions :

1. Within the Group of Proportion Class and Serving Unit, if the Funding Purpose is equal to WS MH then :

[Total Number of visits for Serving Unit with both WS and WS MH] = Number of Attended Appointments[against that Prop.Class, Serving Unit, Funding Purpose = 'WS' + Number of Attended Appointments[against that Prop.Class, Serving Unit, Funding Purpose = 'WS MH'

Number of Attended Appointments is another measure that is calculated as :

Number of Attended Appointments := CALCULATE ( DISTINCTCOUNT(Tbl1[VisitKey],'Attendance Status'[Attendance Status Code] IN { "5", "6", "9", "VPCP", "VPCPC", "13" })

Serving Unit comes from Tbl2 that is related to Tbl1
Funding Type comes from Tbl3, that is related to Tbl1

2. Wherever the Proportion Class, Serving Unit group does not have a funding type of WS MH then [Total Number of visits for Serving Unit with both WS and WS MH] can be blank or equal to Number of Attended Appointments[against that Prop.Class, Serving Unit, Funding Purpose].

I am not concerned about the second scenario but how to get the values for first scenario ?

How to return a single SUMMED up value for particular grouping at Proportion Class, Serving Unit level.

I am attaching the excel snapshot showing how this needs to be calculated for clarity. Would much appreciate help on this.ProblemScenario and DesiredResult_01June2020.PNG

Viewing all 48968 articles
Browse latest View live


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