I have an active relationship between table A and B that can’t be deactivated. Now, I have a inactive relationship between the same two table and I need to use this relationship as a filter for both. What can I do?
I have tried everything and I always manage to filter only one table.
Thanks everyone in advance
Ed
Concatenate both column of each table on which relations can be created and create a new relationship on this newly created column this will help u to filter the report using both the columns
Eg:- Table 1 - Relation ship columns are C1 and C2
Table 2 - Relationship column are C3 and C4
create a new column in table 1 say RC1 using dax Concatenate(c1,c2) and in table 2 say RC2 using
Concatenate(c3,c4) now create a realtionship on RC1 and RC2 (both side relationship)
Related
My relationship between two tables looks like this:
I use a single select slicer that filters the table [ExhibitorClass_Details]. But it is not filtering the joined table [EventMax_Details]:
Why does my slicer not filter the joined table, what am I missing?
How can I make the slicer filter both tables?
The Solution was to go under Manage Relationships and set up the "cross filter direktion":
Result:
I am trying to determine if a date is between 2 other dates that are is 2 different tables using
Power BI.
For simplicity, here is the model that I have :
TableB is the bridge table between TableA and TableC.
I have an inactive relationship between tableA and TableC.
I have tried the following logic to check if TableC.createdDate is between TableA.startDate and TableA.endDate :
Create a calculated column in TableC, but I was not able to access columns in TableA
Create a calculated column in TableB, but I was having blank results, which is not suppose to happen
Have you tried using USERELATIONSHIP to force your calculated column to use the inactive relationship to TableA? documentation link
So something like
CALCULATE(
{{created date is >start and <end}},
USERELATIONSHIP('TableA'[TableB_ID],'TableC'[TableB_ID]
)
I am wondering is it possible to filter dim table based on fact table?
What I mean by that is that I have a dim table with records that are not all avalible in fact table. I load following dummy data to Power BI and create relationship by segment.
date
customer
segment
value
01.01.2021
1
A
10
02.01.2021
1
A
10
03.01.2021
1
A
10
04.01.2021
1
A
10
01.01.2021
2
B
20
02.01.2021
2
B
30
03.01.2021
2
B
40
dict table:
segment
segment_desc
A
Name of A
B
Name of B
C
Name of D
D
Name of D
Now I create one table with all column from facts and slicer with dim table.
As we see dim slicer shows all records from dim even if there are no coresponding records in fact table. I recall that for instance in QlikView we would only see records that are also in fact table. Is it possible in Power BI?
Enabling bi directional relationship doesn't do the trick - table is still not filtering the Slicer. I know that I can do inner join with fact table, but maybe there is a way to avoid this cumbersome solution.
This is one of the most annoying features of Power BI if you ask me. But there is a solution!
You need to write a new measure.
Dim Slicer Filter = INT( NOT ISEMPTY( 'fact table name' ) )
Next, make sure the dim slicer is selected, then drag and drop the new measure to the Filter pane. Drag the measure to one of the Filters on this visual boxes. In the options, make sure "is" is selected from the Show items when the value dropdown and then type in 1 in the input box below. Should be good to go after hitting "Apply filter."
If you need more information on this functionality. SQLBI has an article on this very subject here.
I have a situation, I want to get the reseller sales for "WASHINGTON REGION"; the database is "AdventureWorksDW2019" and I have the column relation as follows:
The geography details are populated in "DimGeography" table,
The reseller details are populated in "DimReseller" table, where each geography, say in my case, WASHINGTON could have more then reseller; hence, there is many-to-one relation between "DimReseller" and "DimGeography" and the column in relation is "GeographyKey"
The fact table "FactResellerSales" table is populated with reseller-sales; hence there is many-to-one relation between "FactResellerSales" and "DimReseller" tables; the column in relation is "ResellerKey"
--and the fact table has indirectly relation with "DimGeography" table
I am struggling generate a DAX query to get reseller-sales total belonging to "Washington"; could anyone help me understand to achieve this?
Thank you for giving your valuable time; pls find the screenshot of the schema diagram attached to this email.
I have a table about occupational accidents in a Company. This table have a date column about when this accidents happened. What I want to do is make another table about occupational accidents dates with day, month and year columns which is joined with the another table by the date I extracted from the Occupational accidents table (In my database known as OPS table.
I thought it would be easy but when i tried to do the relationship beetween OPS[Fecha](This is the field date from OPS table) and Date[ID](Date is how i called my new table and ID is the field joined with the another table), the relationship returns me as many to many what makes no sense because i think it should be 1 to 1.
This is what i did and my result:
1.This is the table I'm talking about.
I added as a new query:
Convert to table.
I changed the column name to ID
5.Then I try to make the relationship between these 2 tables waiting to get a 1 to 1 relation and I get this:
What I want to get is something like this relation:
When you add a new query and after converting it to a table, add a new step to remove duplicates(screenshot below). Once this is done you will be able to create a One-to-Many relationship between these 2 queries. But you CAN'T be able to create One-to-One.
Also, please search online on how relationships work in Power BI. I recommend this video: https://www.youtube.com/watch?v=-4ybWQSRcOY