Forum Discussion

Gabriel_Largura's avatar
Gabriel_Largura
Frequent Visitor
5 years ago

Need Help

I have the table below:

 

 

and I need to generate a new table where I define the value of line 1 and the others are searched in the column 'Prox Ponto', below an example

 

Result

35311-512776-512777

35311-516028-512776

35311-516022-516028

35311-512597-516022

 

8 Replies

  • v-kelly-msft's avatar
    v-kelly-msft
    Community Support

    Hi  Gabriel_Largura ,

     

    First create a table as below:

    Table 2 = VALUES('Table'[Prox Ponto])

    Then create a measure as below:

    Measure = 
    IF(MAX('Table'[Indice]) in FILTERS('Table 2'[Prox Ponto]),MAX('Table'[Indice]),BLANK())

    Finally create a table as you need:

    Table 3 = UNION(ROW("Result","35311-512776-512777"),FILTER(VALUES('Table'[Indice]),'Table'[Indice]='Table'[Measure]))

    And you will see:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly
    Did I answer your question? Mark my post as a solution!
  • thank you v-kelly-msft 
    but still not the desired result...

     

    I would like a result "similar" to this calculation

     

    'tableresult' = 

    line 1 = "35311-512776-512777"

    line 2 = lookupvalue('table'[Prox Ponto],'table'[Indice],line 1)
    line 3 = lookupvalue('table'[Prox Ponto],'table'[Indice],line 2)
    line 4 = lookupvalue('table'[Prox Ponto],'table'[Indice],line 3)
    .....


    WHILE lookupvalue('table'[Prox Ponto],'table'[Indice],line X) <> BLANK()

    • v-kelly-msft's avatar
      v-kelly-msft
      Community Support

      Hi  Gabriel_Largura ,

       

      Create a column as below:

      Lookupvalue = LOOKUPVALUE('Table'[Prox Ponto],'Table'[Indice],'Table'[Indice],"35311-512776-512777")

       Then create a table as below:

      Table 3 = 
      DISTINCT(UNION(ROW("Result","35311-512776-512777"),FILTER(VALUES('Table'[Lookupvalue]),'Table'[Lookupvalue]<>BLANK())))

      And you will see:

      For the related .pbix file,pls see attached.

       

      Best Regards,
      Kelly
      Did I answer your question? Mark my post as a solution!
    • v-kelly-msft's avatar
      v-kelly-msft
      Community Support

      Hi  Gabriel_Largura ,

       

      After checking the sample data you provided,could you pls advise me why some data which can be searched in Prox Ponto is not existing in the result,such as "35311-512777-512776"?

       

       

      Best Regards,
      Kelly
      Did I answer your question? Mark my post as a solution!