Forum Discussion

anthony_dobson's avatar
anthony_dobson
Frequent Visitor
5 years ago
Solved

Relating LIKE operation

 

Basically I am looking of a way of relating certain data in PowerBI. The "Product Inventory Lookup String" is a discovered string subset of the SoftwareInventory table "Product" column. So I want to use this LookUp String as a LIKE on the Product column to match. This means multiple "Product" matches are desired. Obviosuly this can;t be done via relating tables directly. What is DAX or Power Query way to do this?

 

AppMapping Table:

 

Suite NameRelease StatusPackage NameProduct Inventory Lookup String
ArcGIS Desktop 10.7.11595Not PassedArcGIS Desktop 10.7.11595ArcGIS Desktop
ArcGIS Desktop 10.8.14362 Not PassedArcGIS Desktop 10.8.14362 ArcGIS Desktop 
BISNot PassedPackage 12Package_12
GIMSReleasedPackage 12Package_12

 

 

SoftwareInventory Table:

 

PublisherProduct
ArcGISArcGIS Desktop 10.7.11595
ArcGISArcGIS Desktop 10.8.14362 
Dept 1Package 12 R2
Dept 1Package 12 R1
Dept 2ArcGIS Desktop R1

 

  • anthony_dobson , you can create a new column in AppMapping table

     

    maxx(filter(SoftwareInventory, search( AppMapping[Product Inventory Lookup String], SoftwareInventory[Product],,0)>0),SoftwareInventory[Publisher])

     

    This can slow as there is no equal column

     

     

4 Replies

  • anthony_dobson , you can create a new column in AppMapping table

     

    maxx(filter(SoftwareInventory, search( AppMapping[Product Inventory Lookup String], SoftwareInventory[Product],,0)>0),SoftwareInventory[Publisher])

     

    This can slow as there is no equal column

     

     

    • anthony_dobson's avatar
      anthony_dobson
      Frequent Visitor

      Hey I am after all matches from Product column. So I want to match Package 12 from "Product Inventory Lookup String" and return multiple rows as additional table rows: "Package 12 R2" + "Package 12 R1"

      • amitchandak's avatar
        amitchandak
        Super User

        anthony_dobson , try like

         

        concatenatex(filter(SoftwareInventory, search( AppMapping[Product Inventory Lookup String], SoftwareInventory[Product],,0)>0),SoftwareInventory[Product]," + ")

  • I solved this by making a new column in the SoftwareInventory table similar to amitchandak first reply and then related this new column to Product Inventory Lookup String from AppMapping table

     

    Thanks!