diff --git a/CareTogether.Report/definition/pages/b86606d8cc618ca89105/page.json b/CareTogether.Report/definition/pages/b86606d8cc618ca89105/page.json index 39b02e6..a4b0289 100644 --- a/CareTogether.Report/definition/pages/b86606d8cc618ca89105/page.json +++ b/CareTogether.Report/definition/pages/b86606d8cc618ca89105/page.json @@ -21,6 +21,43 @@ } }, "type": "RelativeDate", + "filter": { + "Version": 2, + "From": [ + { + "Name": "d", + "Entity": "Date", + "Type": 0 + } + ], + "Where": [ + { + "Condition": { + "Comparison": { + "ComparisonKind": 0, + "Left": { + "Column": { + "Expression": { + "SourceRef": { + "Source": "d" + } + }, + "Property": "Date" + } + }, + "Right": { + "DateSpan": { + "Expression": { + "Now": {} + }, + "TimeUnit": 0 + } + } + } + } + } + ] + }, "howCreated": "User" } ], diff --git a/CareTogether.Report/definition/pages/d08ff20b71001be16c90/visuals/177d33ba163573002323/visual.json b/CareTogether.Report/definition/pages/d08ff20b71001be16c90/visuals/177d33ba163573002323/visual.json index 47f7ee6..9a149be 100644 --- a/CareTogether.Report/definition/pages/d08ff20b71001be16c90/visuals/177d33ba163573002323/visual.json +++ b/CareTogether.Report/definition/pages/d08ff20b71001be16c90/visuals/177d33ba163573002323/visual.json @@ -236,6 +236,13 @@ "Value": "false" } } + }, + "show": { + "expr": { + "Literal": { + "Value": "true" + } + } } } } @@ -726,5 +733,65 @@ ] }, "drillFilterOtherVisuals": true + }, + "filterConfig": { + "filters": [ + { + "name": "c150471057b9458e21a8", + "field": { + "Column": { + "Expression": { + "SourceRef": { + "Entity": "Date" + } + }, + "Property": "Year" + } + }, + "type": "Advanced" + }, + { + "name": "0d8050a50efb7599ca0c", + "field": { + "Column": { + "Expression": { + "SourceRef": { + "Entity": "Date" + } + }, + "Property": "Month Name Short" + } + }, + "type": "Categorical" + }, + { + "name": "2810060fca2e4f60699a", + "field": { + "Column": { + "Expression": { + "SourceRef": { + "Entity": "Location" + } + }, + "Property": "Location" + } + }, + "type": "Categorical" + }, + { + "name": "58a487407235c9ea2d0e", + "field": { + "Measure": { + "Expression": { + "SourceRef": { + "Entity": "Child Location Record" + } + }, + "Property": "Days of Care" + } + }, + "type": "Advanced" + } + ] } } \ No newline at end of file diff --git a/CareTogether.Report/definition/pages/d08ff20b71001be16c90/visuals/4736b559dc9108b497b9/visual.json b/CareTogether.Report/definition/pages/d08ff20b71001be16c90/visuals/4736b559dc9108b497b9/visual.json index 71a6060..fa085e5 100644 --- a/CareTogether.Report/definition/pages/d08ff20b71001be16c90/visuals/4736b559dc9108b497b9/visual.json +++ b/CareTogether.Report/definition/pages/d08ff20b71001be16c90/visuals/4736b559dc9108b497b9/visual.json @@ -481,5 +481,135 @@ ] }, "drillFilterOtherVisuals": true + }, + "filterConfig": { + "filters": [ + { + "name": "c95c69fa10c06b6deed0", + "field": { + "Column": { + "Expression": { + "SourceRef": { + "Entity": "Location" + } + }, + "Property": "Location" + } + }, + "type": "Categorical" + }, + { + "name": "d209572f6aa31d8693e1", + "field": { + "Measure": { + "Expression": { + "SourceRef": { + "Entity": "Referral" + } + }, + "Property": "# of Families Referred" + } + }, + "type": "Advanced" + }, + { + "name": "a24293084d20049decb1", + "field": { + "Measure": { + "Expression": { + "SourceRef": { + "Entity": "Entity" + } + }, + "Property": "# of Families Supported" + } + }, + "type": "Advanced" + }, + { + "name": "3e49ed49ae4e023c415f", + "field": { + "Measure": { + "Expression": { + "SourceRef": { + "Entity": "Entity" + } + }, + "Property": "# of Children Cared For" + } + }, + "type": "Advanced" + }, + { + "name": "cbf0214be538e7eff490", + "field": { + "Measure": { + "Expression": { + "SourceRef": { + "Entity": "Arrangement" + } + }, + "Property": "# of Arrangements Started" + } + }, + "type": "Advanced" + }, + { + "name": "50e527fa2123b423e251", + "field": { + "Measure": { + "Expression": { + "SourceRef": { + "Entity": "Child Location Record" + } + }, + "Property": "Days of Care" + } + }, + "type": "Advanced" + }, + { + "name": "29447961d7dc4ce7e9ce", + "field": { + "Measure": { + "Expression": { + "SourceRef": { + "Entity": "Child Location Record" + } + }, + "Property": "Nights of Care" + } + }, + "type": "Advanced" + }, + { + "name": "f7bc66bad845c7f2ba4d", + "field": { + "Measure": { + "Expression": { + "SourceRef": { + "Entity": "Entity" + } + }, + "Property": "# Impacted Adults" + } + }, + "type": "Advanced" + }, + { + "name": "e1a6888589920fd4d179", + "field": { + "Measure": { + "Expression": { + "SourceRef": { + "Entity": "Entity" + } + }, + "Property": "# Impacted Children" + } + }, + "type": "Advanced" + } + ] } } \ No newline at end of file diff --git a/CareTogether.Report/definition/pages/d08ff20b71001be16c90/visuals/a20737a507bae877b71b/visual.json b/CareTogether.Report/definition/pages/d08ff20b71001be16c90/visuals/a20737a507bae877b71b/visual.json index 154107b..0a11735 100644 --- a/CareTogether.Report/definition/pages/d08ff20b71001be16c90/visuals/a20737a507bae877b71b/visual.json +++ b/CareTogether.Report/definition/pages/d08ff20b71001be16c90/visuals/a20737a507bae877b71b/visual.json @@ -2,11 +2,11 @@ "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/2.1.0/schema.json", "name": "a20737a507bae877b71b", "position": { - "x": 830.27027027027032, - "y": 480.86486486486484, + "x": 836.72354948805457, + "y": 480.40955631399316, "z": 15000, - "height": 228.32432432432432, - "width": 435.89189189189187, + "height": 227.91808873720137, + "width": 434.94880546075086, "tabOrder": 15000 }, "visual": { @@ -726,5 +726,65 @@ ] }, "drillFilterOtherVisuals": true + }, + "filterConfig": { + "filters": [ + { + "name": "154e9ca8a52baaba983a", + "field": { + "Column": { + "Expression": { + "SourceRef": { + "Entity": "Date" + } + }, + "Property": "Year" + } + }, + "type": "Advanced" + }, + { + "name": "4affa7689cb1ee865bf6", + "field": { + "Column": { + "Expression": { + "SourceRef": { + "Entity": "Date" + } + }, + "Property": "Month Name Short" + } + }, + "type": "Categorical" + }, + { + "name": "610c7e1033b1c4aabbcf", + "field": { + "Column": { + "Expression": { + "SourceRef": { + "Entity": "Location" + } + }, + "Property": "Location" + } + }, + "type": "Categorical" + }, + { + "name": "6cd9856982b82178c0ee", + "field": { + "Measure": { + "Expression": { + "SourceRef": { + "Entity": "Child Location Record" + } + }, + "Property": "Nights of Care" + } + }, + "type": "Advanced" + } + ] } } \ No newline at end of file diff --git a/CareTogether.Report/definition/pages/pages.json b/CareTogether.Report/definition/pages/pages.json index 7f15b7f..3875699 100644 --- a/CareTogether.Report/definition/pages/pages.json +++ b/CareTogether.Report/definition/pages/pages.json @@ -13,5 +13,5 @@ "ReportSectiondde1dd56e86a6be0bd57", "e3e436ecd75be754ee24" ], - "activePageName": "96791911d9aa80a413e8" + "activePageName": "b86606d8cc618ca89105" } \ No newline at end of file diff --git a/CareTogether.Report/definition/report.json b/CareTogether.Report/definition/report.json index 14026e3..1916cdb 100644 --- a/CareTogether.Report/definition/report.json +++ b/CareTogether.Report/definition/report.json @@ -106,7 +106,7 @@ "expanded": { "expr": { "Literal": { - "Value": "false" + "Value": "true" } } } diff --git a/CareTogether.SemanticModel/definition/cultures/en-US.tmdl b/CareTogether.SemanticModel/definition/cultures/en-US.tmdl index 59a057b..c9ce91b 100644 --- a/CareTogether.SemanticModel/definition/cultures/en-US.tmdl +++ b/CareTogether.SemanticModel/definition/cultures/en-US.tmdl @@ -22997,6 +22997,15 @@ cultureInfo en-US } } ] + }, + "role_approval.entity_id": { + "Definition": { + "Binding": { + "ConceptualEntity": "Role Approval", + "ConceptualProperty": "Entity Id" + } + }, + "State": "Generated" } }, "Relationships": { diff --git a/CareTogether.SemanticModel/definition/model.tmdl b/CareTogether.SemanticModel/definition/model.tmdl index c475510..c2e0486 100644 --- a/CareTogether.SemanticModel/definition/model.tmdl +++ b/CareTogether.SemanticModel/definition/model.tmdl @@ -33,7 +33,7 @@ annotation PBI_QueryOrder = ["Community","Role","OData Live","Production","Refer annotation __PBI_TimeIntelligenceEnabled = 1 -annotation PBIDesktopVersion = 2.145.1105.0 (25.07)+decbc46fce458c5b8d5109d6f32a743f2ac949c8 +annotation PBIDesktopVersion = 2.145.1262.0 (25.07)+10bdeda5ab0db954b2cf824e7a117ad7cee97f88 annotation PBI_ProTooling = ["CalcGroup","DevMode","DaxQueryView_Desktop"] diff --git a/CareTogether.SemanticModel/definition/tables/Child Location Record.tmdl b/CareTogether.SemanticModel/definition/tables/Child Location Record.tmdl index 119d85d..27a3ca4 100644 --- a/CareTogether.SemanticModel/definition/tables/Child Location Record.tmdl +++ b/CareTogether.SemanticModel/definition/tables/Child Location Record.tmdl @@ -115,52 +115,72 @@ table 'Child Location Record' changedProperty = IsHidden - measure 'Days of Care' = + measure 'Days of Care' = ``` VAR CurrentDate = TODAY() - VAR StartDate = [Selected Timeframe Start] // This is a measure calculating the start of the desired timeframe. - VAR EndDate = [Selected Timeframe End] // This is a measure calculating the end of the desired timeframe. + VAR StartDate = [Selected Timeframe Start] + VAR EndDate = [Selected Timeframe End] VAR Result = CALCULATE( - DISTINCTCOUNT(ChildLocationExpanded[Date]), + COUNTROWS( + DISTINCT( + SELECTCOLUMNS( + 'ChildLocationExpanded', + "Key", + FORMAT('ChildLocationExpanded'[Date], "yyyy-MM-dd") & "-" & + 'ChildLocationExpanded'[Index] // Supondo que "Index" é um identificador por criança, linha, etc. + ) + ) + ), 'ChildLocationExpanded'[ChildcarePlan] <> "WithParent", 'ChildLocationExpanded'[Date] >= StartDate, - 'ChildLocationExpanded'[Date] <= MIN(EndDate, CurrentDate) // Ensure calculation up to the current date or the end date, whichever is earlier. + 'ChildLocationExpanded'[Date] <= MIN(EndDate, CurrentDate) ) RETURN IF( - CurrentDate < StartDate, // If today is before the start date, show BLANK. + CurrentDate < StartDate, BLANK(), IF( Result = 0, - 0, // Return 0 if no data is found within the range up to the current date. - Result // Otherwise, return the actual count. + 0, + Result ) ) + + ``` formatString: 0 lineageTag: 0efc4a39-0f01-4fda-8796-3c832f9c8af2 measure 'Nights of Care' = ``` VAR CurrentDate = TODAY() - VAR StartDate = [Selected Timeframe Start] // This is a measure calculating the start of the desired timeframe. - VAR EndDate = [Selected Timeframe End] // This is a measure calculating the end of the desired timeframe. + VAR StartDate = [Selected Timeframe Start] + VAR EndDate = [Selected Timeframe End] VAR Result = CALCULATE( - DISTINCTCOUNT(ChildLocationExpanded[Date]), + COUNTROWS( + DISTINCT( + SELECTCOLUMNS( + 'ChildLocationExpanded', + "Key", + FORMAT('ChildLocationExpanded'[Date], "yyyy-MM-dd") & "-" & + 'ChildLocationExpanded'[Index] // Supondo que "Index" é um identificador por criança, linha, etc. + ) + ) + ), 'ChildLocationExpanded'[ChildcarePlan] <> "WithParent", - 'ChildLocationExpanded'[OvernightStay] = TRUE(), // Only consider records where OvernightStay is TRUE. + 'ChildLocationExpanded'[OvernightStay] = TRUE(), 'ChildLocationExpanded'[Date] >= StartDate, - 'ChildLocationExpanded'[Date] <= MIN(EndDate, CurrentDate) // Ensure calculation up to the current date or the end date, whichever is earlier. + 'ChildLocationExpanded'[Date] <= MIN(EndDate, CurrentDate) ) RETURN IF( - CurrentDate < StartDate, // If today is before the start date, show BLANK. + CurrentDate < StartDate, BLANK(), IF( Result = 0, - 0, // Return 0 if no data is found within the range up to the current date. - Result // Otherwise, return the actual count. + 0, + Result ) ) diff --git a/CareTogether.SemanticModel/definition/tables/Role Approval.tmdl b/CareTogether.SemanticModel/definition/tables/Role Approval.tmdl index 3693f4a..36fa73a 100644 --- a/CareTogether.SemanticModel/definition/tables/Role Approval.tmdl +++ b/CareTogether.SemanticModel/definition/tables/Role Approval.tmdl @@ -217,5 +217,5 @@ table 'Role Approval' annotation PBI_NavigationStepName = Navigation - annotation PBI_ResultType = Exception + annotation PBI_ResultType = Table