Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I'm wondering how I would go about calculating this. I want to know how many properties we have Parking Rate information for, regardless of whether it's reserved parking rates or unreserved.
In the chart below I have 10 properties. Some have info for 1 column or the other, or both. However, counting and suming both columns will give me an inaccurate result, making it seem like we have 80%, when in reality it is 60%. How would I go about calculating this without double counting in certain situations?
Unreserved Parking | Reserved Parking |
$10 | $15 |
$20 | |
$14 | $20 |
$10 | |
$18 | |
$20 |
Thanks!
Solved! Go to Solution.
Hi @peterg417
Try this where Table1 is the table you show:
Measure = COUNTROWS ( FILTER ( Table1, OR ( Table1[Unreserved Parking] <> BLANK (), Table1[Reserved Parking] <> BLANK () ) ) )
to count the number of properties that have info on either type of parking or this measure to calculate the percentage you talk about:
Measure2 = DIVIDE ( COUNTROWS ( FILTER ( Table1, OR ( Table1[Unreserved Parking] <> BLANK (), Table1[Reserved Parking] <> BLANK () ) ) ), COUNTROWS ( Table1 ) )
Hi @peterg417
Try this where Table1 is the table you show:
Measure = COUNTROWS ( FILTER ( Table1, OR ( Table1[Unreserved Parking] <> BLANK (), Table1[Reserved Parking] <> BLANK () ) ) )
to count the number of properties that have info on either type of parking or this measure to calculate the percentage you talk about:
Measure2 = DIVIDE ( COUNTROWS ( FILTER ( Table1, OR ( Table1[Unreserved Parking] <> BLANK (), Table1[Reserved Parking] <> BLANK () ) ) ), COUNTROWS ( Table1 ) )
Thank you!!
I can't verify whether the numbers are correct, but my guess is that they are since they're much lower than when I tried to do it (and the logic in your code makes sense), so I assume that's correct.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
99 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |