Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi All,
I have Dim table [customer] and 2 fact tables which I cannot append or merge.
| Customer | id |
| Joe | A |
| Jane | B |
| Joseph | C |
Fact table 1
| Id | Amount |
| A | 500 |
| B | 400 |
| C | 100 |
Fact table 2
| Id | Amount |
| B | 1000 |
Now I want the measure to Sum the amount of [fact table 2] and (the amount of [fact table 1] Exept for the id`s that are present in the [fact table 2]). So Each id gets only included once. I also want a text for each row indicatin from which fact table the amount is taken.
Result:
| Customer | Amount | Origin |
| Joe | 50 | Fact table 1 |
| Jane | 1000 | Fact table 2 |
| Joseph | 100 | Fact table 1 |
Hope you can help me
Solved! Go to Solution.
Hi @BobKoenen
I think it would be best to do this in PQ but see the file attached for a possible solution through measures as requested
Amount_M =
VAR fT2_ = SELECTEDVALUE(FTable2[Amount])
RETURN
IF(ISBLANK(fT2_), SELECTEDVALUE(FTable1[Amount]), fT2_)
Origin_M =
VAR fT2_ = SELECTEDVALUE(FTable2[Amount])
RETURN
IF(ISBLANK(fT2_), "FTable1", "FTable2")
|
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
Hi @BobKoenen
I think it would be best to do this in PQ but see the file attached for a possible solution through measures as requested
Amount_M =
VAR fT2_ = SELECTEDVALUE(FTable2[Amount])
RETURN
IF(ISBLANK(fT2_), SELECTEDVALUE(FTable1[Amount]), fT2_)
Origin_M =
VAR fT2_ = SELECTEDVALUE(FTable2[Amount])
RETURN
IF(ISBLANK(fT2_), "FTable1", "FTable2")
|
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 8 | |
| 8 | |
| 7 |