Forum Discussion
Relationship not recognized
Hi all. I have a model I'm working on for tracking vacancies for several multifamily buildings. Since some of the properties are close together, I have combined them into "Property Groups," which has its own table.
Let's work with the "Bossier East Apartments" Property Group as an example. I have the following measure that works with most of the properties:
This measure is supposed to count the # of vacancies at each property. When I use a Proprety Group slicer for "Bossier East Apartments," Power BI will correctly count up the vacancies for Bossier East, but not Vieux Carre Apartments, which is also in the BE Property Group.
I went into the data, and Power BI will not count the Vieux Carre Apartments at all. I verified that the Property Name "VIEUX CARRE APARTMENTS" in the Property Groups table is the exact same as it appears in my vacancy table (I also checked for extra spaces).
I've spent the last couple of days trying to get this working, but have had no luck. What other info can I provide that might help you all suggest some solutions? Thank you in advance for your help.
- Jared
The Calendar table is broken, so hard to troubleshoot completely. Your card with the Total Units measure had an error as it was being filtered by one of the broken columns. When I removed that visual filter, both the Total Units and Vacant Units cards responded to selection of a Property Group on the table visual.
Regards,
Pat
14 Replies
- mahoneypatMicrosoft Employee
Hard to troubleshoot without having your data or model, but here are two things to consider:
1. Are you sure you used the Property Group column in your slicer? Since the name is same for the selected unit in both columns, I have to ask the obvious one.
2. Instead of a separate table with Property Groups (which should work fine), you could also consider setting up a Groups column in your original table. Please see this link -
https://exceleratorbi.com.au/grouping-in-power-bi-desktop-without-using-dax/
It should give you the same functionality (unless there are other things you are doing with the Property Group table).
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- parry2kSuper User
Anonymous mahoneypat recommendation is great but not sure why you are using COUNTA function, use COUNTROWS or COUNT
Total Count = COUNTROWS ( TableProperty ) or Total Count = COUNT ( TabeProperty[Address] )COUNTA will not count BLANK() values, read more here.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos 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.⚡
- AnonymousNot applicable
Hi Parry,
Thanks for the suggestion. I updated my measure from COUNTA to COUNTALL. I'm still not at a solution, but the code is a little cleaner.
- AnonymousNot applicable
Hi Pat Thanks for the reply. I took a look at the grouping article that you shared, and I think that I need to keep the original "Property Groups" table since I'm also using it to relate data from our G/L and tenant directories.
The slicer works with other test cases, and I've removed it and am now just filtering by property name ("Vieux Carre Apartments"), instead of group. The problem appears to be in my datasets. The G/L and Tenant Directories return the correct information when filtering, but Vacancies does not return the correct number of rows. I get "(Blank)" for Vacant Units, when there are 3 rows in the table. I also tried changing the formula to COUNTROWS in my measure, but got the same results. The "Total Units" measure works, but that's referencing the "Unit Directory" table.This is from the Unit Vacancies table in my model:
I thought it might be a data issue, so I went back into my .csv files and compared the string "VIEUX CARRE APARTMENTS" in the Property Groups table to my vacancy table, but they match.
Am I able to create the color-coded grouping relationships that you mentioned and have them auto-update somehow as we bring in new rows? Thanks for the help.