Morning all,
Working Version 2018.1
I have (at least what I think, but if I really knew I wouldn't be here asking. ) a fairly straight forward question to ask. The project I am working on is to viz the fleet costs for my company's vehicles.
I am trying to develop a test for vehicle utilization as all I am trying to show: For each month, just show the vehicle tags that are underutilized.
The test utilization goes a like this:
Test 1 - Has the vehicle been in the inventory for at least 6 months. If this is true then proceed to test 2.
Test 2 - Is the average 6 month mileage greater than or less than 400 miles. If less than 400 miles - mark the vehicle underutilized.
Where I am stuck is Test 1. Here is my question:
How do I write a calculated field that says - IF COUNT(Transaction Date)>6 THEN "At least 6 months in inventory" (or something like this).
I am working on learning how to do calculations in Tableau.
My data is attached and looks like this:
Vehicle TagTransaction DateMonthly CostABC1/1/2018 $ 166.00 ABC1/2/2018 $ 166.00 ABC1/3/2018 $ 149.00 ABC1/4/2018 $ 64.00 ABC1/5/2018 $ 173.00 ABC1/6/2018 $ 185.00 ABC1/7/2018 $ 99.00 ABC1/8/2018 $ 66.00 DEF1/1/2018 $ 66.00 DEF1/2/2018 $ 121.00 DEF1/3/2018 $ 98.00 DEF1/4/2018 $ 77.00 DEF1/5/2018 $ 108.00
So in this case:
Car ABC would be subject to Test 2 because COUNT(Transaction Date) = 8
Car DEF would not be subject to Test 2 because COUNT(Transaction Date) = 5
Thank you for your help!
Scott
Hi, Scott
here is my result based on your excel file. all of the 3 vehicles are fall into test2 as the count of month is over 6
Maybe I miss something, if yes, can you explain a bit more?
ZZ