Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I have 2 different visuals using different tables as shown.
I want to merge them into one but my problem is their currencies are different so when the user moved from one account to another it must show the right currency.
Thanks...tksnota
Solved! Go to Solution.
Hi @tksnota
This is why dimension tables are essential. Directly linking two fact tables isn't ideal because they often have different columns or column values. Instead, create a table that combines the currencies from both tables, then establish one-to-many relationships between this new table and the fact tables.
Sample Calculated table
CurrencyTable =
-- Step 1: Create a table containing only the 'Currency' column from Table1
VAR Tbl1 =
SELECTCOLUMNS (
Table1,
-- Source table
"Currency", -- Column name in the result
Table1[Currency] -- Column to extract
) -- Step 2: Create a table containing only the 'Currency' column from Table2
VAR Tbl2 =
SELECTCOLUMNS (
Table2,
-- Source table
"Currency", -- Column name in the result
Table2[Currency] -- Column to extract
) -- Step 3: Combine Tbl1 and Tbl2, remove duplicates, and return the result
RETURN
DISTINCT ( UNION ( Tbl1, -- First table
Tbl2 -- Second table
) )
Proud to be a Super User!
Hi @tksnota
This is why dimension tables are essential. Directly linking two fact tables isn't ideal because they often have different columns or column values. Instead, create a table that combines the currencies from both tables, then establish one-to-many relationships between this new table and the fact tables.
Sample Calculated table
CurrencyTable =
-- Step 1: Create a table containing only the 'Currency' column from Table1
VAR Tbl1 =
SELECTCOLUMNS (
Table1,
-- Source table
"Currency", -- Column name in the result
Table1[Currency] -- Column to extract
) -- Step 2: Create a table containing only the 'Currency' column from Table2
VAR Tbl2 =
SELECTCOLUMNS (
Table2,
-- Source table
"Currency", -- Column name in the result
Table2[Currency] -- Column to extract
) -- Step 3: Combine Tbl1 and Tbl2, remove duplicates, and return the result
RETURN
DISTINCT ( UNION ( Tbl1, -- First table
Tbl2 -- Second table
) )
Proud to be a Super User!
@tksnota , Can you share sample data of tables
Proud to be a Super User! |
|
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
87 | |
66 | |
52 | |
45 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |