Power BI Connector: Difference between revisions

From CoPlanner 11
Jump to navigationJump to search
Basic Translation Part 1
First Translation almost complete
Line 89: Line 89:


=== Funktion Subsetzuordnung ===
=== Funktion Subsetzuordnung ===
''Verfügbar ab CoP 11 HF 1.0.''
Available from CoP 11 HF 1.0.


CoPlanner Tabellen selbst haben kein Mapping zu den Subsets. Um dieses Mapping zu generieren und die Daten auch richtig zu berechnen, müssen die Daten speziell geladen werden.
CoPlanner tables themselves have no mapping to the subsets. In order to generate this mapping and to calculate the data correctly, the data must be specially loaded.


Wählen Sie dazu im Navigator die Funktion "Subsetzuordnung" aus und wählen Sie nicht "Laden" sondern "Daten transformieren". Es öffnet sich der Power Query-Editor, in welchem die Parameter definiert werden können.
To do this, select the "Subset assignment" function in the Navigator and do not select "Load" but "Transform data". The Power Query Editor opens, in which the parameters can be defined.


Als erstes muss die WebAppUrl des CoPlanners angegeben werden, dann die Basisdimension des Subsets und der Name des Subsets.
First the WebAppUrl of the CoPlanner has to be specified, then the base dimension of the subset and the name of the subset.


Über "Aufrufen" wird nun die Abfrage erstellt. Geben Sie der Abfrage einen Namen. Nun müssen in der Modellierung noch die richtigen Beziehungen aktiviert und angepasst werden. Das Subset soll nur eine Verbindung zur Subsetmapping Tabelle haben (Achtung, die ist meistens zu Beginn deaktiviert), die Verbindung vom Subset direkt zur Dimension soll entfernt werden und die Beziehung zwischen Subsetmapping und Dimension muss auf die Kreuzfilterung "Beide" umgestellt werden.
The query is now created via "Call". Give the query a name. Now the correct relationships have to be activated and adjusted in the modeling. The subset should only have one connection to the subset mapping table (attention, this is usually deactivated at the beginning), the connection from the subset directly to the dimension should be removed and the relationship between subset mapping and dimension must be switched to cross-filtering "Both".


[[Datei:PBI Subsetmapping.png|ohne|mini]]
[[Datei:PBI Subsetmapping.png|ohne|mini]]


=== Berechtigungen verwalten (Funktion "Security (dynamic RLS)") ===
=== Berechtigungen verwalten (Funktion "Security (dynamic RLS)") ===
Berechtigungen zur Datenquelle CoPlanner werden unter den Datenquelleneinstellungen verwaltet (Benutzer/Passwort). Hier kann man Einstellen ob diese lokal, oder am Bericht gespeichert werden.  
Permissions to the data source CoPlanner are managed under the data source settings (user/password). Here you can set whether these are saved locally or on the report.  


Für die richtige Berechtigung der Daten wie im CoPlanner muss man noch weitere Schritte durchführen. Das kommt daher, dass die Daten im Bericht importiert sind und von einem anderen Benutzer nicht neu geladen werden müssen. Dadurch könnte der Benutzer Dinge sehen, die er nicht sehen darf. Die Berechtigungen der Daten können über die Funktion "Security (dynamic RLS)" aus dem CoPlanner Connector aufgebaut werden. Dazu sollte der Berichtsbauer, der die Daten importiert/aktualisiert, alle Rechte haben, da die RLS (row-level security) die bestehenden Daten nur weiter einschränken kann. Berechtigungen werden in CoPlanner und in Power BI auf Stammdaten vergeben. In Power BI hat man zusätzlich die Möglichkeit einer OLS (Object level security), welche es im CoPlanner nicht gibt. Daher wird diese hier auch nicht weiter beschrieben.  
For the correct authorization of the data as in the CoPlanner, you have to carry out further steps. This is because the data in the report is imported and does not need to be reloaded by another user. This could allow the user to see things they are not allowed to see. The data authorizations can be set up using the "Security (dynamic RLS)" function from the CoPlanner Connector. To do this, the report builder importing/updating the data should have all rights, as the RLS (row-level security) can only further restrict the existing data. Authorizations are assigned to master data in CoPlanner and in Power BI. In Power BI you also have the option of OLS (Object level security), which is not available in CoPlanner. Therefore, it is not further described here.
{{Hinweis|Text=Die Berechtigung funktioniert nur, wenn man sich mit einem Power BI Konto anmeldet, welches als E-Mail beim entsprechen Benutzer in der CoPlanner Benutzerverwaltung hinterlegt ist und der Benutzer der Rolle in Power BI zugewiesen ist.}}


Note The authorization only works if you log in with a Power BI account, which is stored as an email with the corresponding user in the CoPlanner user administration and the user is assigned the role in Power BI.


Example: Not all report recipients are allowed to see all product data. The rights for the product dimension should be applied to the users COPLANNER\user1 with the stored e-mail address user1@coplanner.com and COPLANNER\user2 with the stored e-mail address user2@coplanner.com created in CoPlanner.


'''Beispiel:''' Nicht alle Berichtsempfänger dürfen alle Produktdaten sehen. Für die im CoPlanner angelegten Benutzer COPLANNER\benutzer1 mit der hinterlegten E-Mailadresse benutzer1@coplanner.com und COPLANNER\benutzer2 mit der hinterlegten E-Mailadresse benutzer2@coplanner.com sollten die Rechte für die Produktedimension angewendet werden.
Open the navigator and select the Security (dynamic RLS) function. Then do not click on "Load", but on "Transform data".


Öffnen des Navigators und auswählen der Funktion Security (dynamic RLS). Dann nicht auf "Laden" klicken, sondern "Daten transformieren".
Then enter the WebAppUrl of the server in the parameters, the dimension/subset for which the authorization should be drawn, and click on "Select column..." for the user name. Since you can specify a list of user names downstream, Power BI expects a selection here. Just select anything, because that will have to be corrected in the next step anyway. Then click on "Invoke".


Hier dann bei den Parametern die WebAppUrl des Servers angeben, die Dimension/das Subset, für das die Berechtigung ziehen soll, und beim Benutzernamen muss man auf "Spalte auswählen..." klicken. Da man nachgelagert einen Liste von Benutzernamen angegeben kann, erwartet sich Power BI hier eine Auswahl. Wählen Sie einfach irgendetwas aus, da das im nächsten Schritt ohnehin korrigiert werden muss. Dann auf "Aufrufen" klicken.
A new query is created. In the formula window you will now find something along the lines of "= #"Security (dynamic RLS)"("<nowiki>https://myserver.coplanner.com:4443/coplanner</nowiki>", "Products", MyQuery[MyField])"


Es entsteht eine neue Abfrage. Im Formelfenster finden Sie nun etwas in die Richtung "= #"Security (dynamic RLS)"("<nowiki>https://myserver.coplanner.com:4443/coplanner</nowiki>", "Produkte", MeineAbfrage[MeinFeld])"
This query must now be adjusted so that the list of users for whom the permissions should be given is specified as the third parameter. The users are to be specified in curly brackets in single quotes, separated by commas. In our case, we generate the following query here:


Diese Abfrage muss nun angepasst werden, dass als dritter Parameter die Liste der Benutzer, für welche die Berechtigungen ziehen sollten angegeben wird. Die User sind in geschwungenen Klammern in Hochkomma durch Kommas getrennt anzugeben. In unserem Fall generieren wir hier die folgende Abfrage:
= #"Security (dynamic RLS)"("<nowiki>https://myserver.coplanner.com:4443/coplanner</nowiki>", "Products", {"COPLANNER\user1","COPLANNER\user2"})


= #"Security (dynamic RLS)"("<nowiki>https://myserver.coplanner.com:4443/coplanner</nowiki>", "Produkte", {"COPLANNER\benutzer1","COPLANNER\benutzer2"})
Under the properties we can assign a name for the query, e.g. Products_RLS.


Unter den Eigenschaften können wir einen Namen für die Abfrage vergeben z.B. Produkte_RLS.  
Note The query for the dimension/subset name is case sensitive.


{{Hinweis|Text=Die Abfrage auf den Dimensions-/Subsetnamen ist case sensitive.}}{{Hinweis|Text=Wählen Sie nur die Benutzer, für die die Security wirklich erforderlich ist, da alle zusätzlichen Daten die Performance beinträchtigen können.}}{{Hinweis|Text=Es gibt auch die Möglichkeit in Power BI Parameter zu verwalten. Über diese kann man z.B. die WebAppUrl des Servers speichern und dann auf diesen Parameter zugreifen.
Note Only select the users for whom security is really required, since any additional data can impair performance.
Ist ein Parameter definiert, kann man in der Abfrage ohne Hochkomma über den Parameternamen zugreifen.}}


In der Modellierung muss das Ergebnis der Abfrage mit der Dimension verknüpft werden. Dazu erstellt man eine Beziehung zwischen der ID der Dimension (Produkte_ID) und dem DimensionElement unserer Abfrage.  
Note There is also the option to manage parameters in Power BI. This can be used, for example, to save the server's WebAppUrl and then access this parameter.


Wichtig dabei ist, dass die Kreuzfilterrichtung auf Beide steht und der Sicherheitsfilter in beide Richtungen angewandt wird. In unserer Abfrage kann das DimensionElement öfter vorkommen, wenn wir die Security für mehrere Benutzer holen, ist daher n zu einer (1) Produkt_ID. 
If a parameter is defined, you can access the query via the parameter name without inverted commas.


Damit die RLS nun auch wirklich für jemanden zieht, muss mindestens eine Rolle in Power BI erstellt werden.
In the modeling, the result of the query must be linked to the dimension. To do this, we create a relationship between the ID of the dimension (Products_ID) and the DimensionElement of our query.


Bei dieser Rolle muss auf die Abfragen, welche über die Funktion Security (dynamic RLS) erstellt wurden  (in unserem Beispiel Produkte_RLS), ein Filter auf die MailAddress gesetzt werden. Dieser sollte dann wie folgt im Tabellenfilter-DAX-Ausdruck definiert sein: [MailAddress] = userprincipalname()
It is important that the cross filter direction is set to Both and the security filter is applied in both directions. In our query, the DimensionElement can appear more than once if we're fetching security for multiple users, so n is to one (1) product_id.


Wurde der Bericht dann veröffentlicht, muss man am Dataset des Berichts über den Kontextmenüeintrag "Sicherheit" die Benutzer als Mitglieder der Gruppe hinzufügt werden, damit die Security zieht.  
In order for the RLS to really work for someone, at least one role must be created in Power BI.
 
With this role, a filter on the MailAddress must be set on the queries that were created using the Security (dynamic RLS) function (in our example Products_RLS). This should then be defined as follows in the table filter DAX expression: [MailAddress] = userprincipalname()
 
If the report was then published, you have to add the users as members of the group to the dataset of the report via the context menu entry "Security" so that the security takes effect.


==== Testen der Row Level Security in der Desktopversion ====
==== Testen der Row Level Security in der Desktopversion ====
Die Row Level Security kann auch ohne einen weiteren Benutzer getestet werden in der Desktopvariante. Wählen sie im Menü "Anzeigen als" und hinterlegen Sie den Power BI Benutzer, welchen Sie testen wollen und wählen Sie die erstellte Rolle aus. Wenn der Benutzer eingeschränkte Rechte auf Dimensionen hat und diese auch in Power BI modelliert wurden, dann müssen diese nun ziehen.  
The row level security can also be tested without another user in the desktop version. Select "View as" in the menu and enter the Power BI user you want to test and select the role you created. If the user has limited rights to dimensions and these were also modeled in Power BI, then they must now be dragged.  


=== Veröffentlichen von Berichten/Dashboards ===
=== Veröffentlichen von Berichten/Dashboards ===
Berichte/Dashboards werden mit dem Button Veröffentlichen freigegeben.
Reports/dashboards are released with the Publish button.


Danach werden das Dataset und die Visualisierung in das Power BI Service (Cloud) übertragen. Über einen Link/Frame/Power BI Online, werden die Dashboard an die Benutzer verteilt. Diese benötigen dazu die Rechte. Ein Fileshare wäre möglich, Power BI Desktop sollte jedoch nur für das Erstellen der Berichte verwendet werden. Veröffentlichte CoPlanner Daten können mithilfe eines Gateways aus der Cloud heraus aktualisiert werden. Diesem Gateway muss der Custom Connector hinterlegt werden, damit die Daten aktualisiert werden können. Damit die Row Level Security richtig funktioniert, sollte der Benutzer, der bei der Datenquelle in der Cloud hinterlegt wird, alle Rechte im CoPlanner besitzen und ein CoPlanner Benutzer sein (also Authentifizierungsmethode Basic).
Then the dataset and the visualization are transferred to the Power BI Service (Cloud). The dashboards are distributed to the users via a link/frame/Power BI Online. They need the rights to do this. A file share would be possible, but Power BI Desktop should only be used to create the reports. Published CoPlanner data can be updated from the cloud using a gateway. The Custom Connector must be stored in this gateway so that the data can be updated. In order for Row Level Security to work properly, the user who is stored at the data source in the cloud should have all rights in CoPlanner and be a CoPlanner user (i.e. Basic authentication method).


=== Tipps um Berichte/Dashboards optimieren ===
=== Tipps um Berichte/Dashboards optimieren ===
<blockquote>
<blockquote>
* Sind nicht relevante Felder/Tabellen/Dimensionen bei "Sichtbar für Analyse (Power BI)" auf nein gesetzt?
* Are non-relevant fields/tables/dimensions set to no for "Visible for analysis (Power BI)"?         Delete unused tables/queries.         By default, Power BI tries to recognize time information from columns and to offer an internal time dimension for it. This can cost performance, so this function should be disabled. See Load Data -> Time Intelligence -> Auto. Date / time          Restrict plan tables to individual scenarios unless they are needed for comparisons          Only load Row Level Security for users who actually have access
* Löschen Sie nicht verwendete Tabellen/Abfragen.
* Per Default versucht Power BI Zeitinformationen aus Spalten zu erkennen und dafür eine interne Zeitdimension anzubieten. Dies kann Performance kosten, deshalb sollte diese Funktion deaktiviert werden. Siehe unter Daten laden -> Zeitintelligenz -> Auto. Datum/Uhrzeit
* Einschränken von Plantabellen auf einzelne Szenarien, sofern diese nicht für Vergleiche benötigt werden
* Row Level Security nur für Benutzer laden, die auch wirklich zugreifen
</blockquote>
</blockquote>


=== Caches leeren ===
=== Caches leeren ===
Unter den Optionen von Power BI unter Daten laden gibt es die Möglichkeit Caches zu löschen. Dies kann sinnvoll sein, wenn man Performanceprobleme oder andere unerwartete Probleme hat bei Dingen, die schon funktioniert hatten.
Under the Power BI options under load data there is the possibility to delete caches. This can be useful if you're having performance issues or other unexpected problems with things that were already working.


== FAQs ==
== FAQs ==


=== Mein Knoten wird in der Hierarchie bis zur Blattelementebene dargestellt, obwohl er Childelemente hat. Warum ist das so? ===
=== My node is represented in the hierarchy down to the leaf element level even though it has child elements. Why is that? ===
Dieses Verhalten sieht man, wenn auf dem Knoten selbst ein Wert vorhanden ist. Power BI verhält sich hier nicht wie der CoPlanner, dass nur am Knotenelement der Wert einfach summiert wird, sondern es muss hier auch von der untersten Ebene weg einen Zweig für den Wert geben.
 
=== This behavior is seen when there is a value on the node itself. Power BI does not behave like the CoPlanner here, in that the value is simply summed up at the node element, but there must also be a branch for the value from the lowest level. ===
 
=== I get an error message on the server: Too many login attempts ===
 
=== This is the case when too many queries are generated, which are then run against the CoPlanner server. The permitted value can be controlled via the svrconfig.xml with the parameters LogonMaximumPerTimeframe and LogonMaximumTimeframeInSeconds. ===
 
=== I can't see a table/dimension/subset in Power BI, but it is present in the model. ===
 
=== The object management in CoPlanner can be used to control which tables, subsets or dimensions are visible in Power BI. In addition, fields, lookup tables, dimensions and calculated fields can be hidden for each object. This is controlled via the "Visible for analysis (Power BI)" setting. ===
 
=== Where is my CoPlanner data when I use it in Power BI ===


=== Ich bekomme am Server eine Fehlermeldung: Too many login attempts ===
=== If a dashboard is created with Power BI Desktop, the loaded CoPlanner data is in the .pbix file. If the dashboard is published in the cloud, the data set with the CoPlanner data is also moved to the cloud and is therefore located in a Microsoft data center. This can be stored during installation, please ask your administrator about this. ===
Das ist der Fall, wenn zu viele Abfragen generiert werden, die dann gegen den CoPlanner Server abgefahren werden. Der zulässige Wert lässt sich über die svrconfig.xml mit den Parametern LogonMaximumPerTimeframe und LogonMaximumTimeframeInSeconds steuern.  


=== Ich bekomme in Power BI eine Tabelle/Dimension/Subset nicht angezeigt, welche aber im Modell vorhanden ist. ===
=== How can my data be updated automatically ===
Über die Objektverwaltung kann im CoPlanner gesteuert werden, welche Tabellen, Subsets oder Dimensionen in Power BI sichtbar sind. Zusätzlich können hier je Objekt auch die Felder, Lookup-Tabellen, DImensionen und berechneten Felder ausgeblendet werden. Gesteuert wird das über die Einstellung "Sichtbar für Analyse (Power BI)".


=== Wo liegen meine CoPlanner Daten, wenn ich diese in Power BI verwende ===
=== If the data is in the cloud, you can specify an update job on the data source. For example update data from CoPlanner once a night. ===
Wird ein Dashboard mit Power BI Desktop erstellt, dann befinden sich die geladenen CoPlanner Daten im .pbix File. Wird das Dashboard in der Cloud veröffentlicht wird das Dataset mit den CoPlanner Daten auch in die Cloud verschoben und liegt somit in einem Rechenzentrum von Microsoft. Dies kann man bei der Installation hinterlegen, hierzu befragen Sie bitte ihren Administrator.  


=== Wie können meine Daten automatisiert aktualisiert werden ===
=== Is there a way to distribute my reports without my data going to the cloud? ===
Wenn sich die Daten in der Cloud befinden kann man einen Aktualisierungsjob auf der Datenquelle angeben. Zum Beispiel Daten aus CoPlanner einmal in der Nacht aktualisieren.


=== Gibt es eine Möglichkeit meine Berichte zu verteilen, ohne das meine Daten in die Cloud kommen? ===
=== There are options, but they are very limited. ===
Es gibt Möglichkeiten, die aber sehr einschränkend sind.


Variante 1:
=== Version 1: ===


Alle Benutzer besitzen Power BI Desktop und greifen über einen Fileshare darauf zu.
=== All users own Power BI Desktop and access it through a file share. ===


Variante 2:
=== Variant 2: ===


Es gibt Power BI auch über die SQL Server Reporting Services. Bei dieser Variante kann man die CoPlanner Daten aber nicht aktualisieren ohne den Bericht neu hochzuladen, da Custom Connectors hier nicht unterstützt werden, weshalb diese Methode eher theoretisch ist. Zusätzlich braucht man für diese Variante eine eigene Power BI Desktop Version.
=== Power BI is also available via SQL Server Reporting Services. With this variant, however, you cannot update the CoPlanner data without re-uploading the report, since custom connectors are not supported here, which is why this method is rather theoretical. In addition, you need your own Power BI desktop version for this variant. ===
__NOTOC__  
__NOTOC__  
__NOEDITSECTION__
__NOEDITSECTION__
[[Category:!Hauptkategorie]] [[Category:Power BI Connector]]
[[Category:!Hauptkategorie]] [[Category:Power BI Connector]]
[[en:Power BI Connector]]
[[en:Power BI Connector]]

Revision as of 08:41, 30 March 2023

The CoPlanner Power BI Connector is the perfect tool for CoPlanner PowerUsers with Power BI knowledge to distribute innovative dashboards with current CoPlanner data in the company. The CoPlanner Power BI Connector was developed to be able to obtain data from the CoPlanner without having to fetch it directly from the SQL database. With the connector it is possible to import tables, dimensions, subsets and functions from CoPlanner models into Power BI (no live connection) from any number of CoPlanner server instances.

This connector was developed following Microsoft's guidelines for creating a custom connector for Power BI.

Voraussetzungen

  • Power BI Desktop is installed
  • CoPlanner Server runs at https
  • CoPlanner license must have Power BI enabled

Installation

The installation for the desktop version can be installed via the CoPlanner Power BI connector.msi.

This saves the "CoPlanner.pqx" connector to the directory C:\Users\<username>\Documents\Power BI Desktop\Custom Connectors and sets registry keys so that the connector is considered trustworthy.

The CoPlanner.pqx is also made available without the installer for use with the gateway.

Verwendung

In the "Retrieve data" menu item there is a connector called CoPlanner under "More...", provided that it has been installed correctly. If you select this, you must enter the URL under which the server can be reached (e.g. https://myservername:4443/coplanner) and you can optionally enter the language. If you connect to this URL for the first time, you will get a dialog where you can decide whether you want to log in via Windows authentication or via the CoPlanner user. This user must be available and authorized accordingly in CoPlanner. If you want to authorize access to the data according to the CoPlanner when you have published the report, you should choose a user who has all rights, since data can only be removed later and cannot be added. If you access this URL further, you will no longer get this query. If you want to change the user, you have to adjust this via the data source settings. After access, you get a window, the navigator, in which date tables, functions and tables, dimensions and subsets are listed, provided they have "Available for analyzes (Power BI)" checked. Here you select the relevant data that you want to display in this report and load them. If you have forgotten something or simply want to expand the report, you can simply do this via the sources used last. In general, it is recommended to restrict not only the objects, but also the fields of the objects to the required fields via the flag "Available for analyzes (Power BI)" in the object management, since then only the relevant data is fetched and it is therefore more efficient is.

Beziehungen verwalten

When using more than one table, which also use the same dimensions, it is important to properly maintain the relationships. If these are properly maintained, you can filter by the dimensions in the report. These connections are created when they are created, but must then be checked to ensure that all relationships have been created and that they are correct.

Hierarchien erstellen

In contrast to the CoPlanner, Power BI expects that all sheet elements are on the same level. The connector delivers the dimensions flattened accordingly and, if a leaf element is not on the right level, adds further levels with the name of the leaf element, otherwise Power BI would add further levels here that have no name. Dimensions are delivered with fields Level_0 to Level_x. To create a hierarchy from the top level, right-click on Level_0 to open the context menu and choose "Create Hierarchy". If you then click on Level_1, for example, you can add this entry to the hierarchy via the context menu. All other level elements can then simply be added in ascending order. In the data area you can then sort each level according to its corresponding order column. So Level_0 is sorted by Order_0, Level_1 by Order_1, etc.. This gives us a hierarchy and sorting like in CoPlanner. For an easier overview, you can simply hide the level and order columns, as they are otherwise no longer needed.

Datumstabellen

In order for Quickmeasure or time intelligence functions to work in Power BI, a date table must be created according to Power BI specifications. Power BI date tables must have certain properties, such as a column of the data type date or date/dime must have unique values, no empty values,... The CoPlanner Connector provides valid Power BI date tables based on CoPlanner time dimensions.

In order to be able to use the date table created by the connector, it must be marked as a date table in the modeling via the context menu. In addition, a mapping must then take place via the date field of the normal time dimension. Once this has been done, you can use quick measures, e.g. to create the percentage of change compared to the previous year with just a few clicks, without having any DAX knowledge.

Funktion "Daten optimieren"

Tables, dimensions and subsets can be loaded via the navigator. However, we can have two issues here:

1.) All plan data is loaded independently of the plan. This can lead to performance problems and is unnecessary if I only want to look at one plan anyway and not plan comparisons.

2.) I want to use a subset. However, CoPlanner tables themselves have no mapping to the subsets. In order for this mapping to be generated and the data to be calculated correctly, the data must be specially loaded.

Both of these cases can be mapped accordingly using the "Optimize data" function.

Einschränkung der Daten auf einen Plan

To do this, select the Optimize data function in the navigator and do not select "Load" but "Transform data". The Power Query Editor opens, in which the parameters can be defined.

First, the WebAppUrl of the CoPlanner and the table name must be specified.

If it is a plan table, you can now restrict the plan via the scenario if you want to do that. A constraint has advantages in speed. However, if you want to compare several plans with each other, it is not recommended.

Note You can define parameters in Power BI, which you can then use for these queries. It is recommended to create for the URL of the server and in the case for the scenario. This allows you to adjust all queries at the same time simply by changing the parameter.

Specify the scenario parameter or scenario name for the constraint.

If you also want to link the table to a subset, you can also specify your subset mapping here (see Use of subsets) and select a language.

Once all parameters have been assigned, click on "Call".

A query opens with a preview of the result. This can be given a meaningful name and accessed in the visuals. In the Power BI model, the relationships should be maintained automatically, but you should always check them.

Example of a query with a Power BI parameter named ServerUrl, in which the URL of the CoPlanner server is stored, on thebalance sheet_PLAN table for the final budget scenario:

= #"Optimize data"(ServerUrl, "Bilanz_PLAN", "Budget final", null, null)

ServerUrl has the quotes removed here because it is a parameter.

Verwendung von Subsets (Variante 1)

CoPlanner tables themselves have no mapping to the subsets. In order to generate this mapping and to calculate the data correctly, the data must be specially loaded.

To do this, select the "Optimize data" function in the navigator and do not select "Load" but "Transform data". The Power Query Editor opens, in which the parameters can be defined.

First, the WebAppUrl of the CoPlanner and the table name must be specified. Next, the scenario for plan tables can optionally be restricted.

In order to be able to implement future extensions, the subset mapping is a listing. The Power BI UI always wants to get listings from a column. Do not fill this parameter via "Select column...", but click directly on "Call" and define the mapping via the toolbar.

In the Subsetmapping parameter, define the column name of the base dimension in the table with the desired subset using the following syntax:

{"COLUMNNAME_OF_BASEDIMENSION_IN_THE_TABLE=SUBSET_NAME"}

Example of a query on the Bilanz_PLAN table with a mapping on the Sub_Bilanz subset, which was mapped using the Balance sheet structure column.

= #"Optimize data"("https://meinserver:4443/coplanner", "Bilanz_PLAN", null, {"Bilanz-Structur=Sub_Bilanz"}, null)

You can give this query a meaningful name and access it in the visuals.

Template:Hinweis Template:Hinweis

Funktion Subsetzuordnung

Available from CoP 11 HF 1.0.

CoPlanner tables themselves have no mapping to the subsets. In order to generate this mapping and to calculate the data correctly, the data must be specially loaded.

To do this, select the "Subset assignment" function in the Navigator and do not select "Load" but "Transform data". The Power Query Editor opens, in which the parameters can be defined.

First the WebAppUrl of the CoPlanner has to be specified, then the base dimension of the subset and the name of the subset.

The query is now created via "Call". Give the query a name. Now the correct relationships have to be activated and adjusted in the modeling. The subset should only have one connection to the subset mapping table (attention, this is usually deactivated at the beginning), the connection from the subset directly to the dimension should be removed and the relationship between subset mapping and dimension must be switched to cross-filtering "Both".

ohne|mini

Berechtigungen verwalten (Funktion "Security (dynamic RLS)")

Permissions to the data source CoPlanner are managed under the data source settings (user/password). Here you can set whether these are saved locally or on the report.

For the correct authorization of the data as in the CoPlanner, you have to carry out further steps. This is because the data in the report is imported and does not need to be reloaded by another user. This could allow the user to see things they are not allowed to see. The data authorizations can be set up using the "Security (dynamic RLS)" function from the CoPlanner Connector. To do this, the report builder importing/updating the data should have all rights, as the RLS (row-level security) can only further restrict the existing data. Authorizations are assigned to master data in CoPlanner and in Power BI. In Power BI you also have the option of OLS (Object level security), which is not available in CoPlanner. Therefore, it is not further described here.

Note The authorization only works if you log in with a Power BI account, which is stored as an email with the corresponding user in the CoPlanner user administration and the user is assigned the role in Power BI.

Example: Not all report recipients are allowed to see all product data. The rights for the product dimension should be applied to the users COPLANNER\user1 with the stored e-mail address user1@coplanner.com and COPLANNER\user2 with the stored e-mail address user2@coplanner.com created in CoPlanner.

Open the navigator and select the Security (dynamic RLS) function. Then do not click on "Load", but on "Transform data".

Then enter the WebAppUrl of the server in the parameters, the dimension/subset for which the authorization should be drawn, and click on "Select column..." for the user name. Since you can specify a list of user names downstream, Power BI expects a selection here. Just select anything, because that will have to be corrected in the next step anyway. Then click on "Invoke".

A new query is created. In the formula window you will now find something along the lines of "= #"Security (dynamic RLS)"("https://myserver.coplanner.com:4443/coplanner", "Products", MyQuery[MyField])"

This query must now be adjusted so that the list of users for whom the permissions should be given is specified as the third parameter. The users are to be specified in curly brackets in single quotes, separated by commas. In our case, we generate the following query here:

= #"Security (dynamic RLS)"("https://myserver.coplanner.com:4443/coplanner", "Products", {"COPLANNER\user1","COPLANNER\user2"})

Under the properties we can assign a name for the query, e.g. Products_RLS.

Note The query for the dimension/subset name is case sensitive.

Note Only select the users for whom security is really required, since any additional data can impair performance.

Note There is also the option to manage parameters in Power BI. This can be used, for example, to save the server's WebAppUrl and then access this parameter.

If a parameter is defined, you can access the query via the parameter name without inverted commas.

In the modeling, the result of the query must be linked to the dimension. To do this, we create a relationship between the ID of the dimension (Products_ID) and the DimensionElement of our query.

It is important that the cross filter direction is set to Both and the security filter is applied in both directions. In our query, the DimensionElement can appear more than once if we're fetching security for multiple users, so n is to one (1) product_id.

In order for the RLS to really work for someone, at least one role must be created in Power BI.

With this role, a filter on the MailAddress must be set on the queries that were created using the Security (dynamic RLS) function (in our example Products_RLS). This should then be defined as follows in the table filter DAX expression: [MailAddress] = userprincipalname()

If the report was then published, you have to add the users as members of the group to the dataset of the report via the context menu entry "Security" so that the security takes effect.

Testen der Row Level Security in der Desktopversion

The row level security can also be tested without another user in the desktop version. Select "View as" in the menu and enter the Power BI user you want to test and select the role you created. If the user has limited rights to dimensions and these were also modeled in Power BI, then they must now be dragged.

Veröffentlichen von Berichten/Dashboards

Reports/dashboards are released with the Publish button.

Then the dataset and the visualization are transferred to the Power BI Service (Cloud). The dashboards are distributed to the users via a link/frame/Power BI Online. They need the rights to do this. A file share would be possible, but Power BI Desktop should only be used to create the reports. Published CoPlanner data can be updated from the cloud using a gateway. The Custom Connector must be stored in this gateway so that the data can be updated. In order for Row Level Security to work properly, the user who is stored at the data source in the cloud should have all rights in CoPlanner and be a CoPlanner user (i.e. Basic authentication method).

Tipps um Berichte/Dashboards optimieren

  • Are non-relevant fields/tables/dimensions set to no for "Visible for analysis (Power BI)"?         Delete unused tables/queries.         By default, Power BI tries to recognize time information from columns and to offer an internal time dimension for it. This can cost performance, so this function should be disabled. See Load Data -> Time Intelligence -> Auto. Date / time         Restrict plan tables to individual scenarios unless they are needed for comparisons         Only load Row Level Security for users who actually have access

Caches leeren

Under the Power BI options under load data there is the possibility to delete caches. This can be useful if you're having performance issues or other unexpected problems with things that were already working.

FAQs

My node is represented in the hierarchy down to the leaf element level even though it has child elements. Why is that?

This behavior is seen when there is a value on the node itself. Power BI does not behave like the CoPlanner here, in that the value is simply summed up at the node element, but there must also be a branch for the value from the lowest level.

I get an error message on the server: Too many login attempts

This is the case when too many queries are generated, which are then run against the CoPlanner server. The permitted value can be controlled via the svrconfig.xml with the parameters LogonMaximumPerTimeframe and LogonMaximumTimeframeInSeconds.

I can't see a table/dimension/subset in Power BI, but it is present in the model.

The object management in CoPlanner can be used to control which tables, subsets or dimensions are visible in Power BI. In addition, fields, lookup tables, dimensions and calculated fields can be hidden for each object. This is controlled via the "Visible for analysis (Power BI)" setting.

Where is my CoPlanner data when I use it in Power BI

If a dashboard is created with Power BI Desktop, the loaded CoPlanner data is in the .pbix file. If the dashboard is published in the cloud, the data set with the CoPlanner data is also moved to the cloud and is therefore located in a Microsoft data center. This can be stored during installation, please ask your administrator about this.

How can my data be updated automatically

If the data is in the cloud, you can specify an update job on the data source. For example update data from CoPlanner once a night.

Is there a way to distribute my reports without my data going to the cloud?

There are options, but they are very limited.

Version 1:

All users own Power BI Desktop and access it through a file share.

Variant 2:

Power BI is also available via SQL Server Reporting Services. With this variant, however, you cannot update the CoPlanner data without re-uploading the report, since custom connectors are not supported here, which is why this method is rather theoretical. In addition, you need your own Power BI desktop version for this variant.