Forum Discussion

Owensj241's avatar
Owensj241
Frequent Visitor
1 year ago
Solved

Creating a Measure to Identify How Many Vehicles are Overmileage

I need to create a measure that allows me to identify how many vehicles in a report are over mileage. 

 

I also need to to be able to identify the # of overmileage vehicles by division.

 

Can someone assist with the formula I would need to use?

 

Thanks

  • Owensj241 Would need sample data but should look something like the following:

    Measure =
      VAR __Over = 200000 //whatever overmileage is
      VAR __Table = FILTER( 'Table', [mileage] > __Over )
      VAR __Result = COUNTROWS( __Table )
    RETURN
      __Result

5 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Owensj241 Would need sample data but should look something like the following:

    Measure =
      VAR __Over = 200000 //whatever overmileage is
      VAR __Table = FILTER( 'Table', [mileage] > __Over )
      VAR __Result = COUNTROWS( __Table )
    RETURN
      __Result
  • Owensj241's avatar
    Owensj241
    Frequent Visitor
    OdometerManufacturerModelDivision
    124292CHEVROLETIMPALASurveillance
    251653CHEVROLETSUBURBANSwat
    227201CHEVROLETEXPRESS 2500Swat
    219570CHEVROLETEXPRESSSwat
    216422CHEVROLETTAHOEField
    208034CHEVROLETTAHOEField
    199035CHEVROLETEXPRESS 2500Field
    193810FORDEXPLORERField
    191867FORDF-150Field
    191500FORDF-150Field
    190343FORDEXPLORERK9
    189558CHEVROLETSUBURBANSurveillance
    • Greg_Deckler's avatar
      Greg_Deckler
      Icon for Community Champion rankCommunity Champion

      Owensj241 Based on that data, the following measure returns 5:

      Measure = 
        VAR __Over = 200000 //whatever overmileage is
        VAR __Table = FILTER( 'Table', [Odometer] > __Over )
        VAR __Result = COUNTROWS( __Table )
      RETURN
        __Result
  • v-kathullac's avatar
    v-kathullac
    Icon for Community Support rankCommunity Support

    Hi Owensj241 ,

     

    We wanted to kindly follow up to check if the solution provided by the super user resolved your issue? or let us know if you need any further assistance.

     

    Thanks