I am new on MS Dynamics World.
I have relationship one to more.
In which table I have to make relations? On child table or on parent table?
My situation example
Answer for this question I found here
https://www.youtube.com/watch?v=Oe534o9fodU&index=79&list=PLWSxgDbjVWTjxvgnaAZ0iK8o5dYHAYhrq&t=0s
Related
I have a typical fact table with dimensions Project, Profit Center, etc
In a report, I have a table visual that shows individual numbers; and another table shows the department numbers…
It looks something like this:
(Left: personal numbers. Right: department numbers)
My goal is that Tim shouldn’t be able to see someone else’s number, but he definitely can (and should) see the aggregated numbers for his department.
I realized that someone accessing from PowerBI or excel can connect to the model and play with the tables, pick another name and see someone else’s number, therefore I have hidden most tables...
But now, I just realized, someone with access can connect from Visual Studio to the SSAS:
The person can open the .bim, unhide all tables, and with the “analyze from excel” option in VS see any numbers…
Is there any way to avoid/prevent this?
More info:
My model:
(Project table has columns Lead1,Lead2,Lead3,Lead4,Lead5 and Lead6… Engagement Role is just an unpivot of this).
On my left visual I have:
(triggering a more restrictive access).
My RLS:
Is there any way to avoid/prevent this?
RLS will be enforced from every client experience, but RLS is never enforced for Workspace members with higher than Viewer permissions. See Using RLS with workspaces in Power BI
And hiding tables and columns is not a security measure. Hidden tables and columns can be used in DAX queries and measures.
I have the tables as per the below diagram
There are vouchers in LedgerTrans connected with other 3 tables (but each one is independent of other 2 tables - means a voucher will be available in one of the 3 tables - same voucher won't be available across the 3 Project Trans tables).
I have given the connection as per below and the values are populating in 3 different Matrix visuals for each ProjTrans. The problem I am facing is, all the 3 visuals are summing up to the same amount, though the vouchers are showing correctly in each visual respectively. Is my approach wrong (the connection type)?
The 2nd problem is, I brought in the Project table to keep it as a slicer. The same project could be available in all the 3 ProjTrans. But when I select a project in the slicer, only the table with active connection is getting filtered out. The other 2 matrices are showing blank.
How to achieve active connections for all the 3 ProjTrans tables with a single Project table since Power BI would not allow more than 1 active connection?
The problem here isn't that Power BI does not allow more than one active connection. What is not allowed is having multiple paths for one table to filter another table since this results in ambiguities. Since you have bidirectional many-to-many relationships from the fProject tables to the fLedgerTrans table, you would have three distinct paths from dProject to fLedgerTrans if all your relationships were active.
The quickest fix would be to make all of the many-to-many relationships filter only in one direction (fLedgerTrans filters fProject tables). Then you should be able to activate the currently inactive relationships.
More generally, bidirectional many-to-many relationships are considered bad practice. I'd recommend reading the following article, especially if you don't quite understand what I've explained above:
Bidirectional relationships and ambiguity in DAX
I have two tables. Table one is yesterday's data and Table 2 is today's data. Visual 1 is a visual based on Table 1 and Visual 2 is a visual based on Table 2. These two visuals are identical in terms of their layout and filters. I have been tasked to create a 3rd visual which is the delta between the numbers in the two visuals. What is the best way to approach this?
That depends on the relationship between the tables, but assuming the tables are basically identical and have a 1-to-1 relationship you would just use ='Table2'[ColumnX]-'Table1'[ColumnX]
I have a table of dates (every date from 2003 to 2035) in my data model but am wondering if I need to create relationship(s) between this and my other data tables, wondered if anyone could please share best practice?
If so, my main table has several columns of dates so which would I link to?
To be honest, I am thinking I shouldn't create a relationship as any filtering of the date table will then only filter my model by which date column I have a relationship with?
I hope all that makes sense. It's more of an abstract question at the moment but my ultimate goal is to create some kind of rolling average.
Thanks in advance.
The best practise is clearly to create a relationship between your date table and your data table (fact table I assume). But you have to choose the most relevant column to make your link, knowing that it's preferred to not make multiple relationships between the same tables.
If you have a "snapshot date" column, you could make the link with this one to see the status for that period for example. It really is up to you.
If the filtering is annoying to you, you can always disable it on the visuals.
I hope it helps.
I have a Projects table related with the Employees table. So one employee can be the group leader in many projects. The relation is between Projects.GroupLeader field and Employees.ID field
In the Products table i'm trying to add a new column to show the name of the group leader using this
Group leader = RELATED(Employees[Name]) but this does not works. In fact the intellisense of RELATED does not shows me the Employees table.
Any idea please?
regards
The problem was solved. I had not the relation active in my model
I had the same symptom, but in my case the problem was that the related table had duplicates. Check for duplicates if you are stuck!
Hope that helps!