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 28 days ago
    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
    1-843-376-4605
    ------------------------------


  • 2.  RE: Use Latest Description as Input Data

    Top Contributor
    Posted 26 days ago
      |   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 )
    RETURN
        IF ( Table1[Date] = _rlvntMaxDate, TRUE (), FALSE () )​

    PFA the pbix file for your reference.

    ------------------------------
    Gopa Kumar
    Limner Consulting
    ------------------------------

    Attachment(s)



  • 3.  RE: Use Latest Description as Input Data

    Posted 24 days ago
    Mr Gopa,
      Thank you very much.  This is perfect!

    ------------------------------
    Clark Bethancourt
    1-843-376-4605
    ------------------------------