The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello All
I have 2 tables A and B with a one to many relationshio via a key called TOKEN
(unique values on A side, duplicates on B side)
I want to add a column in table A, telling how many rows of table B are related to each row of table A
this should be easy with the folowing formula
NbRelated = COUNTROWS (RELATEDTABLE(B))
But it returns me blank values
can someone help me out ?
thanks
@Anonymous can you put a sample pbix file and share it using one drive/google drive. Also, can you make sure the relationship cross filter direction is single, not both?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thnak you for the advice
It works, with the following remarks :
I have some occurrences of TOKEN in table B which donot exist in table A, and I find them in the count
I have occurrences of TOKEN in table A which donot exist in table B, I would expect a count = 0, which I donot find.
Can this be the explanation of the glitch ?
Thank you
f
@Anonymous that should have worked, before you do this, in a table visual, put token from table a, and token column from table b and change the aggregation to count, do you get any counts against each token?
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
User | Count |
---|---|
75 | |
70 | |
39 | |
30 | |
28 |
User | Count |
---|---|
104 | |
95 | |
51 | |
48 | |
46 |