Forum Discussion

krishna_sipl's avatar
krishna_sipl
Regular Visitor
6 years ago

Table Transformation for sankey diagram

Hello,

I want to create a Sankey chart and as I understand there is a need for Source and destination column but my data is like in the above format :

IDNameTime
1A20/04/2020 12:25:11
1B20/04/2020 12:20:05
1C20/04/2020 12:30:07
2B20/04/2020 11:10:20
2C20/04/2020 11:15:11
3A21/04/2020 10:05:18
4A21/04/2020 13:07:00
4D21/04/2020 13:07:10
4B21/04/2020 13:08:00
4C21/04/2020 13:06:20

 

And form above I want to Transform table by using timewise:

SourceDestinationCount
BA1
AC1
BC2
AA1
AD1
DB1

 

is it possible to do in power bi? 

3 Replies

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

    Hi krishna_sipl ,

     

     

    Can you explain how each column in this table is obtained?
    You may need to use DAX if you want to get this table, but I don’t know its calculation logic.

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • krishna_sipl's avatar
      krishna_sipl
      Regular Visitor

      Hello v-lionel-msft  

      So From Table 1(1st Image): 

      Using Date and ascending Time on that Date, ID wise create a source and Destination

      Example: If one ID has 3 names A, B, C then it will be like by date and ascending time : 

      Source   Destination

      A              B

      B              C

       also, the Same ID can repeat on a different date as well. and count repeated source and destination in Count column.

      • az38's avatar
        az38
        Icon for Community Champion rankCommunity Champion

        Hi krishna_sipl 

        it's completely unclear logic.

        could you explain whats your final result based on your table1? how does should look like your chart?