Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
Expand all | Collapse all

Use Latest Description as Input Data

  • 1.  Use Latest Description as Input Data

    Posted Aug 23, 2019 09:44 AM
    Is there a way to create a table that has the latest part number description?
    Over time the part number description can change.  When I create a matrix with the part number and the description there will be 2 (or more) rows for the same part number but with different descriptions.
      I need the most current description for the part number.
      I cannot accomplish this in the source data since the Power BI data table is a union of two tables.
    Data Example:
    Source Data Part Number

    Results needed example:
    Needed output part number

    I would have to take the resulting table output and join it to my data in order to get just one row for a particular part number.
    Also, my source data comes from 2 Access DB's and spans 3 years so the data source is rather large.
    Any help would be greatly appreciated.

    Clark Bethancourt

  • 2.  RE: Use Latest Description as Input Data

    Top Contributor
    Posted Aug 24, 2019 12:35 PM
      |   view attached
    Hi @Clark Bethancourt

    Please see if the following helps you:

    Create a calculated column in your table using the following DAX. You can then put the [Is Latest] field in your visual to filter the latest Description for each Part Number.
    Is Latest =
    VAR _rlvntpart = Table1[Part Number]
    VAR __rlvntable =
        CALCULATETABLE ( Table1, ALL ( Table1 ), Table1[Part Number] = _rlvntpart )
    VAR _rlvntMaxDate =
        CALCULATE ( MAX ( Table1[Date] ), __rlvntable )
        IF ( Table1[Date] = _rlvntMaxDate, TRUE (), FALSE () )​

    PFA the pbix file for your reference.

    Gopa Kumar
    Limner Consulting



  • 3.  RE: Use Latest Description as Input Data

    Posted Aug 27, 2019 08:21 AM
    Mr Gopa,
      Thank you very much.  This is perfect!

    Clark Bethancourt