I have two tables: Table 1 has trailer IDs by location. Table 2 has the amount of yard slots per location. I have a measure that divides the distinct count of trailer IDs by the distinct count of yard slots in order to give me the percentage of occupancy on the trailer yard per location. There are 4 locations total.
My problem is when I display this in a table visual. if I use a slicer and select a single location it calculates perfectly. But if I have all 4 locations, each on their own row, it gives me something completely different. What am I missing here?
For instance, on 6/17/2021 the percentage should be 50% or .50 because there are 140 yard slots for CX222 and on that day there were 70 trailers. If I select CX222 in my slicer it calculates fine. When I have each location on it's own row I get some other number which I think is based on all of the data as a whole. Any ideas how I can get around this?
My problem is when I display this in a table visual. if I use a slicer and select a single location it calculates perfectly. But if I have all 4 locations, each on their own row, it gives me something completely different. What am I missing here?
For instance, on 6/17/2021 the percentage should be 50% or .50 because there are 140 yard slots for CX222 and on that day there were 70 trailers. If I select CX222 in my slicer it calculates fine. When I have each location on it's own row I get some other number which I think is based on all of the data as a whole. Any ideas how I can get around this?