Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi, I'm trying to create a measure that counts how many tenants each Property Code has.
This is my Tenant Table:
This is the code I'm trying (based on a Curbal video: https://www.youtube.com/watch?v=W4OMwdZNRG0)
When I put the measure into a table with the Property Code and Tenant Name, this is what I'd want it to look like (3rd column):
Am I making this too complicated? How do I add up the number of tenants for each PROP_CODE?
Solved! Go to Solution.
Hi @bonjourposte - can you create the below measure with distinctcount to get the numof ten.
NumTenants =
CALCULATE(
DISTINCTCOUNT(TENANTS[TENANT_NAME]),
ALLEXCEPT(TENANTS, TENANTS[PROP_CODE])
)
Hope it works
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Thanks so much, this looks like it's working. But somehow it's also giving a total of 1 for all the properties that don't have any commercial tenants (like multifamilies, undeveloped lots or parking lots - these are not even loaded into this table yet. This table is just for commercial properties). Any guesses where all the 1's are coming from?
Hi @bonjourposte - can you create the below measure with distinctcount to get the numof ten.
NumTenants =
CALCULATE(
DISTINCTCOUNT(TENANTS[TENANT_NAME]),
ALLEXCEPT(TENANTS, TENANTS[PROP_CODE])
)
Hope it works
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
70 | |
68 | |
51 | |
32 |
User | Count |
---|---|
115 | |
100 | |
74 | |
65 | |
40 |