Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
  • 1.  Match a value from a table with one from another table

    Posted Jul 04, 2022 11:53 AM
    Hello guys

    Please help me with a DAX solution for this case
    I have 2 tables without a relation, one called "Services table" and another "Detail table" where the code detail it is written.
    I want to add a column in "Services table" where if DATA_U is greater than DATA_N, than "Finished" , else bring the code detail from column  DETAIL TABLE.
    In excel i put the formula =IF(C2>B2," Finished",VLOOKUP(E3,J2:K13,2))
    I know that i can merge queries based on the code column and bring the detail intro one table but i need a DAX formula for this.
    Thank you



    ------------------------------
    Mihai Stanca
    Acasa
    ------------------------------


  • 2.  RE: Match a value from a table with one from another table

    Posted Jul 05, 2022 11:53 AM
    Tente

    Medida =
    IF (
        [DATA_U] > [DATA_N],
        "Finished",
        LOOKUPVALUE ( Tabela2[Code Detail], Tabela2[Code], Tabela1[Code] )
    )​


    ------------------------------
    Vilmar Santos
    ------------------------------



  • 3.  RE: Match a value from a table with one from another table

    Posted Jul 05, 2022 02:31 PM

    Hi Mihai,
    "I have 2 tables without a relation"
    Why? Your Detail table is PURE DIM table. Make relation on it.

    Do it like a Pro should do :)

    @Vilmar Gave you one of solution, so no need more.



    ------------------------------
    Adam Artur Boltryk
    Business Analyst
    ------------------------------