Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 @Anonymous
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
) )
Hi @Anonymous
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
) )
@Anonymous , Can you share sample data of tables
Proud to be a Super User! |
|
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 25 |
| User | Count |
|---|---|
| 124 | |
| 87 | |
| 70 | |
| 66 | |
| 65 |