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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

COUNTROWS(RELATEDTABLE

Hey all !

 

I have a problem that I need to solve and that I'm sure someone here can help with.

I have a table that has unique apartment numbers and one where I have number of stakeholders per apartment, I would like to aggregate the information from "interest" to "apartment".

The function I've used that partially works is Intressenter = COUNTROWS(RELATEDTABLE(Interest), but it doesn't work on all apartments and I can't really find why it goes wrong.

 

Does anyone have any good suggestions on how I should do this?

 

//Elin

1 ACCEPTED SOLUTION
Alef_Ricardo_
Resolver II
Resolver II

Hi Elin! 😊

 

It sounds like you're trying to use the `COUNTROWS` function with the `RELATEDTABLE` function to count the number of stakeholders per apartment. If it's not working for all apartments, there could be a few reasons why this is happening.

 

One possibility is that there may be some issue with the relationship between the two tables. You could check if the relationship is set up correctly and that it's active. Another possibility is that there may be some issue with the data in one or both of the tables, such as missing or incorrect values.

 

If you're still having trouble, you could try using a different approach to count the number of stakeholders per apartment. For example, you could use a `CALCULATE` function with a `FILTER` function to count the number of rows in the "Interest" table that are related to each apartment in the "Apartment" table.

 

I hope this helps! Let me know if you have any further questions. 😊

 

View solution in original post

1 REPLY 1
Alef_Ricardo_
Resolver II
Resolver II

Hi Elin! 😊

 

It sounds like you're trying to use the `COUNTROWS` function with the `RELATEDTABLE` function to count the number of stakeholders per apartment. If it's not working for all apartments, there could be a few reasons why this is happening.

 

One possibility is that there may be some issue with the relationship between the two tables. You could check if the relationship is set up correctly and that it's active. Another possibility is that there may be some issue with the data in one or both of the tables, such as missing or incorrect values.

 

If you're still having trouble, you could try using a different approach to count the number of stakeholders per apartment. For example, you could use a `CALCULATE` function with a `FILTER` function to count the number of rows in the "Interest" table that are related to each apartment in the "Apartment" table.

 

I hope this helps! Let me know if you have any further questions. 😊

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.