From 3c78a563384de481c7d387ea09892145addba5b9 Mon Sep 17 00:00:00 2001 From: mvgraca Date: Wed, 4 Mar 2026 18:39:31 +0000 Subject: [PATCH] Developed a specific rule to filter the Roles table based on the Organization Id --- .../visuals/d6084660d102c3617329/visual.json | 17 +- .../pages/101a4b085e432a0c869a/page.json | 9 +- .../visuals/4e529ad821c493623ca9/visual.json | 20 ++- .../definition/pages/pages.json | 2 +- CareTogether.Report/definition/report.json | 2 +- .../definition/database.tmdl | 2 +- .../definition/relationships.tmdl | 1 + .../definition/roles/Dynamic.tmdl | 6 + .../definition/tables/RLS.tmdl | 18 ++- .../definition/tables/Role.tmdl | 10 +- CareTogether.SemanticModel/diagramLayout.json | 153 +++++++++++++----- 11 files changed, 182 insertions(+), 58 deletions(-) diff --git a/CareTogether.Report/definition/pages/03622d788c359b5e7432/visuals/d6084660d102c3617329/visual.json b/CareTogether.Report/definition/pages/03622d788c359b5e7432/visuals/d6084660d102c3617329/visual.json index e6484b3..0055ba4 100644 --- a/CareTogether.Report/definition/pages/03622d788c359b5e7432/visuals/d6084660d102c3617329/visual.json +++ b/CareTogether.Report/definition/pages/03622d788c359b5e7432/visuals/d6084660d102c3617329/visual.json @@ -1,5 +1,5 @@ { - "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/2.1.0/schema.json", + "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/2.5.0/schema.json", "name": "d6084660d102c3617329", "position": { "x": 10.571791613722999, @@ -169,20 +169,7 @@ "isPinned": true } ], - "root": { - "children": [ - { - "identityValues": [ - { - "Literal": { - "Value": "'Host Family'" - } - } - ], - "isToggled": true - } - ] - } + "root": {} } ], "objects": { diff --git a/CareTogether.Report/definition/pages/101a4b085e432a0c869a/page.json b/CareTogether.Report/definition/pages/101a4b085e432a0c869a/page.json index fdc6882..9ea2030 100644 --- a/CareTogether.Report/definition/pages/101a4b085e432a0c869a/page.json +++ b/CareTogether.Report/definition/pages/101a4b085e432a0c869a/page.json @@ -411,5 +411,12 @@ } } ] - } + }, + "visualInteractions": [ + { + "source": "0e0f5f07a55029a7559c", + "target": "6981b709222874e107d0", + "type": "DataFilter" + } + ] } \ No newline at end of file diff --git a/CareTogether.Report/definition/pages/101a4b085e432a0c869a/visuals/4e529ad821c493623ca9/visual.json b/CareTogether.Report/definition/pages/101a4b085e432a0c869a/visuals/4e529ad821c493623ca9/visual.json index 6d911d6..8703702 100644 --- a/CareTogether.Report/definition/pages/101a4b085e432a0c869a/visuals/4e529ad821c493623ca9/visual.json +++ b/CareTogether.Report/definition/pages/101a4b085e432a0c869a/visuals/4e529ad821c493623ca9/visual.json @@ -1,5 +1,5 @@ { - "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/2.1.0/schema.json", + "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/2.5.0/schema.json", "name": "4e529ad821c493623ca9", "position": { "x": 740.27303754266211, @@ -537,5 +537,23 @@ ] }, "drillFilterOtherVisuals": true + }, + "filterConfig": { + "filters": [ + { + "name": "26b22ec8554ced21c1c1", + "field": { + "Column": { + "Expression": { + "SourceRef": { + "Entity": "Community" + } + }, + "Property": "Community Name" + } + }, + "type": "Categorical" + } + ] } } \ No newline at end of file diff --git a/CareTogether.Report/definition/pages/pages.json b/CareTogether.Report/definition/pages/pages.json index 69d95c0..d43be7c 100644 --- a/CareTogether.Report/definition/pages/pages.json +++ b/CareTogether.Report/definition/pages/pages.json @@ -13,5 +13,5 @@ "ReportSectiondde1dd56e86a6be0bd57", "e3e436ecd75be754ee24" ], - "activePageName": "d08ff20b71001be16c90" + "activePageName": "03622d788c359b5e7432" } \ No newline at end of file diff --git a/CareTogether.Report/definition/report.json b/CareTogether.Report/definition/report.json index 8a43553..f114ec9 100644 --- a/CareTogether.Report/definition/report.json +++ b/CareTogether.Report/definition/report.json @@ -1,5 +1,5 @@ { - "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/report/3.0.0/schema.json", + "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/report/3.1.0/schema.json", "themeCollection": { "baseTheme": { "name": "CY24SU10", diff --git a/CareTogether.SemanticModel/definition/database.tmdl b/CareTogether.SemanticModel/definition/database.tmdl index 3d2c0d9..19b27aa 100644 --- a/CareTogether.SemanticModel/definition/database.tmdl +++ b/CareTogether.SemanticModel/definition/database.tmdl @@ -1,3 +1,3 @@ database - compatibilityLevel: 1567 + compatibilityLevel: 1600 diff --git a/CareTogether.SemanticModel/definition/relationships.tmdl b/CareTogether.SemanticModel/definition/relationships.tmdl index 6a34125..38a070f 100644 --- a/CareTogether.SemanticModel/definition/relationships.tmdl +++ b/CareTogether.SemanticModel/definition/relationships.tmdl @@ -147,6 +147,7 @@ relationship e349dd17-a18d-2497-62cf-d76e3ba8ac2c toColumn: Location.'RLS Key' relationship AutoDetected_59e6e179-6344-42a1-944c-b69cf722c579 + crossFilteringBehavior: bothDirections fromColumn: 'Community Member Families'.'Community UID' toColumn: Community.'Community UID' diff --git a/CareTogether.SemanticModel/definition/roles/Dynamic.tmdl b/CareTogether.SemanticModel/definition/roles/Dynamic.tmdl index e587bcd..bc179ab 100644 --- a/CareTogether.SemanticModel/definition/roles/Dynamic.tmdl +++ b/CareTogether.SemanticModel/definition/roles/Dynamic.tmdl @@ -109,5 +109,11 @@ role Dynamic RLS[UserId] = USERNAME() ) + tablePermission Role = + Role[OrganizationId] IN CALCULATETABLE( + VALUES(RLS[OrganizationId]), + RLS[UserId] = USERNAME() + ) + annotation PBI_Id = 48755128b26e4366a08bd6a38df559b4 diff --git a/CareTogether.SemanticModel/definition/tables/RLS.tmdl b/CareTogether.SemanticModel/definition/tables/RLS.tmdl index edd95ed..7bb9a06 100644 --- a/CareTogether.SemanticModel/definition/tables/RLS.tmdl +++ b/CareTogether.SemanticModel/definition/tables/RLS.tmdl @@ -17,6 +17,22 @@ table RLS annotation SummarizationSetBy = Automatic + column OrganizationId + dataType: string + lineageTag: ce37c732-0cd2-4f6e-ace2-a79efb11331c + summarizeBy: none + sourceColumn: OrganizationId + + annotation SummarizationSetBy = Automatic + + column LocationId + dataType: string + lineageTag: 05d2f26a-f10b-4193-a2ff-27616724c840 + summarizeBy: none + sourceColumn: LocationId + + annotation SummarizationSetBy = Automatic + partition RLS = m mode: import queryGroup: RLS @@ -29,7 +45,7 @@ table RLS Source{[Name="LocationUserAccess", Signature="table"]}[Data], "RLS Key", each Text.Combine({[OrganizationId], [LocationId]}, "-") ), - {"RLS Key", "UserId"} + {"RLS Key", "OrganizationId", "LocationId", "UserId"} ) in diff --git a/CareTogether.SemanticModel/definition/tables/Role.tmdl b/CareTogether.SemanticModel/definition/tables/Role.tmdl index dcc1508..945c97b 100644 --- a/CareTogether.SemanticModel/definition/tables/Role.tmdl +++ b/CareTogether.SemanticModel/definition/tables/Role.tmdl @@ -17,6 +17,14 @@ table Role annotation SummarizationSetBy = Automatic + column OrganizationId + dataType: string + lineageTag: e8c282e0-484a-4b73-98fc-7bb1acf9e7e4 + summarizeBy: none + sourceColumn: OrganizationId + + annotation SummarizationSetBy = Automatic + partition Role = m mode: import queryGroup: Dimensions @@ -34,7 +42,7 @@ table Role ), "Role UID", each Text.Combine({[OrganizationId], [Role Name]}, "-") ), - {"Role UID", "Role Name"} + {"OrganizationId", "Role UID", "Role Name"} ) in diff --git a/CareTogether.SemanticModel/diagramLayout.json b/CareTogether.SemanticModel/diagramLayout.json index 80a2bc5..82716f3 100644 --- a/CareTogether.SemanticModel/diagramLayout.json +++ b/CareTogether.SemanticModel/diagramLayout.json @@ -4,14 +4,14 @@ { "ordinal": 0, "scrollPosition": { - "x": 158.36391782713611, - "y": 0 + "x": 1654.6166657129718, + "y": 1443.5518828427778 }, "nodes": [ { "location": { - "x": 2817.5933522591781, - "y": 779.92911349451651 + "x": 6497.2926320802435, + "y": 1396.7312152827831 }, "nodeIndex": "Date", "nodeLineageTag": "c3cfcb9b-c6b2-48e0-8d00-9fe6ec85a978", @@ -23,8 +23,8 @@ }, { "location": { - "x": 657.80292780346178, - "y": 0 + "x": 4337.5022076245268, + "y": 616.80210178826667 }, "nodeIndex": "RLS", "size": { @@ -34,7 +34,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 2023.6162292295744, + "y": 1584.0544676852719 + }, "nodeIndex": "Family", "nodeLineageTag": "5585aeeb-f4e2-456d-8f6e-436d261a4cc2", "size": { @@ -44,7 +47,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 1718.8371523420567, + "y": 1113.619610140755 + }, "nodeIndex": "Person", "nodeLineageTag": "68a9b7b7-2438-4d03-bd69-1eb77d7bd43f", "size": { @@ -54,7 +60,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 1154.6857740171313, + "y": 983.528248434636 + }, "nodeIndex": "Arrangements", "nodeLineageTag": "1874e170-b37e-4a8f-b672-f37058e8d3e6", "size": { @@ -64,7 +73,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 865.277804279146, + "y": 1116.0558324220351 + }, "nodeIndex": "Arrangement Type", "nodeLineageTag": "b2303fb3-bd33-4a97-9b0d-831a6ca8cf94", "size": { @@ -74,7 +86,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 544.57415224979923, + "y": 1079.4269533860443 + }, "nodeIndex": "Childcare", "nodeLineageTag": "0e929471-7d25-410a-953a-359fbad618e6", "size": { @@ -84,7 +99,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 271.20268200240412, + "y": 157.76309055954835 + }, "nodeIndex": "Referrals", "nodeLineageTag": "9e3a875e-349f-43da-84eb-8c636fdefbc9", "size": { @@ -94,7 +112,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 50, + "y": -50 + }, "nodeIndex": "Close Reason", "nodeLineageTag": "a1d60698-0bd2-4f71-8c12-2867d488fec6", "size": { @@ -104,7 +125,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 2234.26444673754, + "y": 1940.212673750659 + }, "nodeIndex": "Community Member Families", "size": { "height": 176, @@ -113,7 +137,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 2427.5312729123334, + "y": 2170.8209943051224 + }, "nodeIndex": "Community", "nodeLineageTag": "e7a84953-27c2-4818-8b9a-4ebdd0ebcb9d", "size": { @@ -123,7 +150,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 2643.6992798210649, + "y": 2377.5906412857548 + }, "nodeIndex": "Community Role Assignments", "nodeLineageTag": "f609fd05-22d1-4600-8e45-7cf87904cf76", "size": { @@ -133,7 +163,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 1028.2597568647511, + "y": 1344.8967249978996 + }, "nodeIndex": "Child Location Record", "nodeLineageTag": "8fbe750b-9267-4d1b-9df7-3a6f63651067", "size": { @@ -143,7 +176,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 1028.3160149869577, + "y": 1812.9824220436992 + }, "nodeIndex": "Childcare Plan", "nodeLineageTag": "8197a540-9290-4d4f-8a22-c9d6c9ca5256", "size": { @@ -153,7 +189,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 738.33017759931954, + "y": 1673.5914820887851 + }, "nodeIndex": "ChildLocationExpanded", "size": { "height": 200, @@ -162,7 +201,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 2469.8995281996467, + "y": 948.38746830785931 + }, "nodeIndex": "Approval Status", "nodeLineageTag": "3ef6724d-6748-4b8d-b25c-519df76a376b", "size": { @@ -172,7 +214,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 2603.5322916302448, + "y": 1356.5216927057663 + }, "nodeIndex": "Role", "nodeLineageTag": "a5a15efd-7639-4e75-a11f-7e21f671acbe", "size": { @@ -182,7 +227,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 2877.6992798210649, + "y": 1249.7953206428774 + }, "nodeIndex": "Arrangements Group", "nodeLineageTag": "a9e85fbb-dcc2-496a-89a9-7067dffa0a55", "size": { @@ -192,7 +240,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 3161.6992798210649, + "y": 1249.7953206428774 + }, "nodeIndex": "Approvals Group", "nodeLineageTag": "96722cdf-8f85-41c2-b47d-8092ea3c5b95", "size": { @@ -202,7 +253,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 2313.6102665806393, + "y": 1281.4694702657409 + }, "nodeIndex": "Family Role Approvals", "nodeLineageTag": "1c9df905-397c-49b4-b600-474b18df7295", "size": { @@ -212,7 +266,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 2008.2196664739618, + "y": 777.12381916550839 + }, "nodeIndex": "Individual Role Approvals", "nodeLineageTag": "f1316aaa-f0fd-49a4-8963-e182d41d7a32", "size": { @@ -222,7 +279,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 2183.2868025763864, + "y": 1126.1009586933496 + }, "nodeIndex": "Approval Type", "nodeLineageTag": "b8cb7b24-2738-41f5-928b-2ce2c2019e8d", "size": { @@ -232,7 +292,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 3445.6992798210649, + "y": 1249.7953206428774 + }, "nodeIndex": "Engagement Group", "nodeLineageTag": "73ee2eee-feeb-4667-91e7-95e39da082c2", "size": { @@ -242,7 +305,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 1428.8253485040632, + "y": 1338.3082764372352 + }, "nodeIndex": "Family Function Assignments", "nodeLineageTag": "c21a9948-7cba-4782-ae1d-3b3dd7308e43", "size": { @@ -252,7 +318,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 1168.1743891848548, + "y": 729.78202813822872 + }, "nodeIndex": "Individual Function Assignments", "nodeLineageTag": "49e39722-8999-4392-9e8a-a71c9b18644f", "size": { @@ -262,7 +331,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 544.49470690159887, + "y": 511.06490310888239 + }, "nodeIndex": "Client Family", "nodeLineageTag": "b2de50d0-cd3c-4669-8a56-bf50dcc20a91", "size": { @@ -272,7 +344,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 834.57786120848709, + "y": 723.96413520557417 + }, "nodeIndex": "Client Person", "nodeLineageTag": "d1d492d4-6e16-4bce-b224-c7fb5de3fa7a", "size": { @@ -282,7 +357,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 254.47611201816176, + "y": 633.71372540809853 + }, "nodeIndex": "Location Client", "size": { "height": 128, @@ -291,7 +369,10 @@ "zIndex": 0 }, { - "location": {}, + "location": { + "x": 2313.5917003918594, + "y": 1726.5928109239942 + }, "nodeIndex": "Location", "size": { "height": 128, @@ -301,7 +382,7 @@ } ], "name": "All tables", - "zoomValue": 36.624504366777884, + "zoomValue": 91.441119345189875, "pinKeyFieldsToTop": false, "showExtraHeaderInfo": false, "hideKeyFieldsWhenCollapsed": false, @@ -311,7 +392,7 @@ "ordinal": 1, "scrollPosition": { "x": 0, - "y": 374.16250607596345 + "y": 0 }, "nodes": [ { @@ -661,6 +742,6 @@ "tablesLocked": false } ], - "selectedDiagram": "Data Model", + "selectedDiagram": "All tables", "defaultDiagram": "All tables" } \ No newline at end of file