Forum Discussion

AndreaPiscitell's avatar
AndreaPiscitell
Frequent Visitor
6 years ago
Solved

Filter by Longest text

Hi Everyone, I am very sorry if the title of the thread is not so clear, but i was not sure how to describe the issue.

I have a table (referring to it as Table1) of data which represent searches that users make. However, the data is presented as following:

 

UserIDBrandModel
User1FiatU
User1FiatUn
User1FiatUno
User2OpelA
User2OpelAs
User2OpelAst
User2OpelAstr
User2OpelAstra

 

How can i modify in Power BI the data in a way that i am able to list only the final model, based on the column UserID and Brand being consistant? 

 

The final result would be seomthing like this:

UserIDBrandModel
User1FiatUno
User2OpelAstra

 

Thanks in advance

  • Hi AndreaPiscitell ,

     

    We can use the following measure to meet your requirement and be dynamical by other slicer.

     

    Final Model = MAX('Table1'[Model])

     

     

     

    BTW, pbix as attached.

     

    Best regards,

    Community Support Team _ Dong Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • AnkitBI's avatar
    AnkitBI
    Icon for Solution Sage rankSolution Sage

    Hi - Please use something like below.

    New Table = SUMMARIZE(Table3,Table3[UserID],"Brand",max(Table3[Brand]),"Model",max(Table3[Model]))

    Thanks
    Ankit Jain
    Do Mark it as solution if the response resolved your problem. Do Kudo the response if it seems good and helpful.

  • v-lid-msft's avatar
    v-lid-msft
    Icon for Community Support rankCommunity Support

    Hi AndreaPiscitell ,

     

    We can use the following measure to meet your requirement and be dynamical by other slicer.

     

    Final Model = MAX('Table1'[Model])

     

     

     

    BTW, pbix as attached.

     

    Best regards,

    Community Support Team _ Dong Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • AndreaPiscitell's avatar
      AndreaPiscitell
      Frequent Visitor

      Thanks a lot, this works! I appreciate the shared pbix file, it makes everything easier to understand.

      Regards, Andrea