Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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. |
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |