Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
TungNguyen_19
Helper III
Helper III

Why SELECTEDVALUE must been placed into CALCULATE to show value in one side of one-many cardinality?

Hello everyone,

I have 2 tables are connecting with the relationship based on 2 columns: Table1[ID_REVENUE] - Table2[ID]

TungNguyen_19_1-1683879789956.png

Now I need to get the column _COLLECT (USD) from Table2 into Table1, because Table1 is on one side (one-many cardinality) so I can not use RELATED and also only 37% ID_REVENUE can be mapped to ID (Note: Table1 is not Dimension of Table2, these are just 2 Fact tables). After researching I use this formular:

_RefCollect_IMP = SELECTEDVALUE('Table2'[_COLLECT (USD)])


It doesn't work but if I add ALLEXCEPT it works?? NoteID_REVENUE and ID are 2 unique columns of Table1

 


_RefCollect_IMP =
CALCULATE(
SELECTEDVALUE('Table2'[_COLLECT (USD)]),
ALLEXCEPT('Table1','Table1'[ID_REVENUE], 'Table1'[ID])

I don't know what is going on behind the scene? Please anyone can explain to me? Also is there any other way/solution for this?

Many thanks to you guys ❤️

 

1 REPLY 1
Anonymous
Not applicable

Hi @TungNguyen_19 ,

 

I think your issue should be caused by your data model. I suggest you to share a samle file with me. This will make it easier for me to find the solution.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.