CONDITIONAL Calculation in Table Visual

lager1001

Board Regular
Joined
May 17, 2019
Messages
88
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?
 

Attachments

  • Capture.JPG
    Capture.JPG
    31.8 KB · Views: 5
  • Capture 2.JPG
    Capture 2.JPG
    24.8 KB · Views: 7

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Is it a measure? Maybe do the calculation in the table as a new column and display it instead of the measure?
 
Upvote 0

Forum statistics

Threads
1,215,013
Messages
6,122,690
Members
449,092
Latest member
snoom82

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top