Show a Column from Fact A table inside a Fact table B

legato

New Member
Joined
Jun 4, 2013
Messages
13
My primary question is:
How should I enable to make column "name" from table fact_B to be displayed inside of table Fact_A by with support of DAX code only?


Additional info:
- In this context, I cant use SQL code
- The relationship is one to may between fact and dim table in the tabular datamodel. No direct relationship between fact A and fact B.
- I'm using SQL server 2012 with SSAS tabular mode.

table fact_A
-----------------------------
PK_fact_A dim_B Qty name
-----------------------------
1 5 4 asdf
2 6 7 bbb
3 7 6 aaaa


table dim_B
---------------------
PK_dim_B cost name
---------------------
5 5 uuu
6 7 uuu_u
7 9 uuu__u


table fact_B
-----------------------------
PK_fact_B dim_B Qty name
-----------------------------
9 5 5 nn
8 6 7 mm
7 6 1 oo
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
This could not work, because, the element of dim_B with id 6, you have 2 different values for name in fact_B.

Or did I miss something?

Why do you want to do this? Can you tell us more?

Is it about being able to use attributes in fact_B to slice/dice measures based on fact_A ? In that case, this can always be done with the CALCULATE( YourMeasure, fact_B ) pattern.
 
Upvote 0
Hi Laurent,

I can tell you this.

When you use the superkey to combine different column for fact_A and fact_B, the result of the data will lead to one to many relationship between fact table.
 
Upvote 0
If I understand correctly what you just wrote, then you will have to use the CALCULATE ( YourMeasure, fact_B) pattern.

For example:
[Number of facts A] := CALCULATE( COUNTROWS( fact_A)
, fact_B
)
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,729
Members
449,049
Latest member
MiguekHeka

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top