Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Help with grouping data

Hello team,

I'm relatively new to Power BI and need some help please.

I have a requirement to display the following data in a summarised view

IDNameInitialsAppointment date
206Person1SB24/11/2022 
206Person1SB28/04/2022 
206Person1SB09/11/2021 
207Person2AB24/11/2022 
207Person2AB28/04/2022 
208Person3XY09/11/2022 
208Person3XY15/05/2022 

 

Expected result

IDNameInitialsAppointment date1Appointment date2Appointment date3
206Person1SB24/11/202228/04/2022 09/11/2021
207Person2AB24/11/202228/04/2022  
208Person3XY09/11/202215/05/2022 0 

 

Any suggestions to do this is in Power BI much appreciated.

 

Thanks,

Suresh

5 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you tried but its not working.

      • andhiii079845's avatar
        andhiii079845
        Solution Sage

        You need a rank of the date within a PersonID like this

        PersonDateRank
        12023-01-01  1
        12022-12-01  2
        22023-01-01  1
        22022-12-01  2

        Nevertheless, why do you want to do this kind of transformation 🙂

  • Syk's avatar
    Syk
    Resident Rockstar

    There's probably a decent way to do this but I'm curious why you're trying to. For reporting it's typically much easier to have all the dates in the same column, what are you trying to create?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you, its a requirement to hide the repeating values and show the distinct dates in a single row. i.e one row per person.

      I have done these in SQL and in other tools, its bit tricky here in Power BI. will keep trying.