Forum Discussion

KleptoKenny's avatar
KleptoKenny
Frequent Visitor
3 years ago
Solved

Vehicles with zero utilisation

I have a register of all assets that is linked to a transaction table which includes number of days on hire if relevant to transaction type. This is linked by the asset number. How do i extract assets that do not have a transaction for sales &/or number of days hired in a month?

  • v-jingzhang's avatar
    v-jingzhang
    3 years ago

    Hi KleptoKenny 

     

    You can create the following measure, then add it to a visual as a filter and make it to show items when value is 0. In the visual, use [EQUIP_CODE] from 'Asset Table'. 

    No. of Sales = COUNTROWS(FILTER('Transaction table','Transaction table'[Trans Type]="Sales"))

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

4 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    KleptoKenny Sorry, having trouble following, can you post sample data as text and expected output?
    Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

    Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

    The most important parts are:
    1. Sample data as text, use the table tool in the editing bar
    2. Expected output from sample data
    3. Explanation in words of how to get from 1. to 2.

    • KleptoKenny's avatar
      KleptoKenny
      Frequent Visitor

      Greg_Deckler 

      Asset Table

      EQUIP_CODE GROUP  DC+GC 
      NAV21821 STEL  1STEL 
      NAV21822 STEL  1STEL 
      NAV21847 FORD  1FORD 
      NAV21881 FORD  1FORD 
      NAV21889 FORD  1FORD 
      NAV21892 FORD  1FORD 
      NAV21924 IVHE  1IVHE 
      NAV21933 FORD  1FORD 
      NAV22085 STEL  1STEL 
      NAV22090 STEL  1STEL 
      NAV22094 STEL  1STEL 
      NAV22236 FORD  1FORD 
      NAV2648 FORD  1FORD 
      NAV4122 IVHE  1IVHE 
      NAV4816 IVHE  1IVHE 
      NAV4817 IVHE  1IVHE 

       

      Transaction table

      EQUIPMENT_CODETrans TypeHPT_F_TRAN_VAL_BCHIRE_START_DATEHIRE_END_DATE HPT_DAYS 
      NAV21821Depre£183.00                    -  
      NAV21821Sales£200.0001/01/202301/02/2023            31.00
      NAV21822Depre£182.00                    -  
      NAV21822Sales£112.5024/01/202327/01/2023              3.00
      NAV21847Depre£212.00                    -  
      NAV21881Depre£267.00                    -  
      NAV21889Depre£342.00                    -  
      NAV21889Sales£495.0016/01/202325/01/2023              9.00
      NAV21892Depre£292.00                    -  
      NAV21892Sales£330.0023/01/202322/02/2023            31.00
      NAV21924Depre£875.00                    -  
      NAV21924Sales£550.0016/01/202323/01/2023              7.00
      NAV21924Sales£550.0009/01/202316/01/2023              8.00
      NAV21933Depre£348.00                    -  
      NAV22085Depre£196.00                    -  
      NAV22085Repair£202.78                    -  
      NAV22085Sales-£64.2910/01/202313/01/2023-            4.00
      NAV22085Sales£225.0006/01/202313/01/2023              7.00

       

      On the asset table i have a list of assets that may not have a sales transaction. I would like to be able to apply a filter to select these so i know which assets do not have any sales revenue.

      Hope this helps - sorry first time on this forum 🙂

      • v-jingzhang's avatar
        v-jingzhang
        Community Support

        Hi KleptoKenny 

         

        You can create the following measure, then add it to a visual as a filter and make it to show items when value is 0. In the visual, use [EQUIP_CODE] from 'Asset Table'. 

        No. of Sales = COUNTROWS(FILTER('Transaction table','Transaction table'[Trans Type]="Sales"))

         

        Best Regards,
        Community Support Team _ Jing
        If this post helps, please Accept it as Solution to help other members find it.