Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
OpenGround | gINT | Keynetix
  • Product Communities
OpenGround | gINT | Keynetix
OpenGround Wiki Creating a specimen list by Combining Tables
    • Sign In
    • -OpenGround Wiki
      • -Applications
        • +Admin Portal
        • +Civil 3D Extension
        • +Data Collector
        • +Data Entry Module
        • +Excel Extension
        • +Launcher
        • +OpenGround Professional
        • +Portal Technical Preview
        • -Power BI Connector
          • Power BI Release Notes
          • +Power BI User Guide
          • +Power BI Sample Report Templates
          • -Power BI - Data techniques
            • Correcting Data types
            • Creating a Duplicate Table with selected Columns
            • Creating a specimen list by Combining Tables
            • Creating new columns
            • Creating Table Relationships
            • Renaming Columns
        • +Template Studio
        • +Upload Portal
        • +Web API and Task Service
        • +Web Portal
      • +Guides and Learning
      • OpenGround Supported Platforms
      • +How To Contact Support
      • Component Center
      • Events
      • Training Guides
      • +Developer Resources

     
     Questions about this article, topic, or product? Click here. 

    Creating a specimen list by Combining Tables

    This is an advanced technique that can be used for creating a specimen list.  It is similar to the UNION command in SQL.

    The tables must have the same fields to be combined successfully in Power BI. 

    The example below illustrates how to create a specimen list.  To prepare the data for this merge follow the steps below.

    • Create three tables from the following lab testing tables, Moisturecontent, LiquidLimit and Grading  - More tables can be added if you want to combine the specimens from more tables.
    • Each table should only return the following fields.  LocationID, DepthTop, Type, SampleReference, SpecimenReference and Depth Specimen Top.
    • Create a new keyfield column for each table so that the lab testing data can be joined via a relationship later on.

    To create a new table that merges these tables together follow the steps below:- 

    • Open the data View for your report by clicking on the data grid icon down the left-hand side of your report.
    • Select New Table from the Table Tools Ribbon.  This creates a blank table and presents the option to define the table using an equation.
    • Enter the following equation into the equation.  This will name the table as "AllSpecimens" and will merge the data together from the LiquidLimit, moisturecontent and grading tables.
      • Allspecimens = union(liquidLimit,moisturecontent,grading)
    • A table will now be generated and displayed in the grid below the equation. 
    • There is one additional step we need to do as there may be the same specimen in more than one table.  If this is the case, then the specimen will be listed twice.  Modify the equation to include the distinct command as shown below so that duplicates will be removed from the table.
      • Allspecimens = distinct(union(liquidLimit,moisturecontent,grading))

    Once this table has been created, it can be used to join to the lab test results tables to create a single table showing all lab results by the specimen.

    • Share
    • History
    • More
    • Cancel
    • Roger Chandler Created by Bentley Colleague Roger Chandler
    • When: Wed, Oct 26 2022 6:47 AM
    • Revisions: 1
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies