Forum Discussion

Mandi-Holt's avatar
Mandi-Holt
Frequent Visitor
4 years ago

Matrix visual - sorting in chronological order rather than alphabetical

I am new to Power BI and have been trying to sort in a Matrix visual.

The visual I am trying to create has the durations of operations carried out by a vessel split by the date and the location the vessel was at.

Currently I have the visual below which has the date and the locations visited by the vessel on that date. The locations are currently being displayed in alphabetical order, but I need to have them displayed in chronological order from when the vessel visited them.

 

The matrix above should have the order on the 19th September 2021 as:

  • B14
  • Transiting to P2 South Quay Nigg
  • P2 South Quay Nigg
  • Transiting to C13

And on the 20th September 2021 as:

  • Transiting to C13
  • C13
  • Transiting to C07
  • C07
  • Transiting to P2 South Quay Nigg
  • P2 South Quay Nigg

There is no set ordering to the locations being visited by the vessel during the project, the vessel can visit multiple locations in a single day and can also return to a previous location on the same day or later in the project. These multiple visits to the same location would have to be displayed separately on the relevant date.

I have linked to a pbix file and some data in a csv file here:

https://www.dropbox.com/sh/8nps0opznudunjc/AAACDlktuoP2ZWwDXVN6ym5Qa?dl=0

 

Many thanks

4 Replies

  • Mandi-Holt's avatar
    Mandi-Holt
    Frequent Visitor

    Thank you for your responce and the link to the video. Unfortunately I am unable to find a way to use a sort by column to be able to view the details in the order required due to there being multiple values against the individual columns. 

    I have tried to sort by StartTime or EndTime, but there multiples of the same value against the same location on same day. Likewise when trying to sort by the DailyLogDate column. 

    Again, thank you for your post. Although it has not solved the issue I have, it has given me more insight into sorting columns.

    • Mandi-Holt's avatar
      Mandi-Holt
      Frequent Visitor

      Hi,

      Sorry for the delay in replying. I have looked at the screenshot you provided and there is not the option to sort by the LocationName. I am also unable to sort by another column as there is more than one value in the DailyLogDate (or StartDate or EndDate) for the same value in LocationName. 

      I have tried to add a table called LocationSort which lists the locations in the order they have been visited during the project, however when sorting by this I then get all the locations I included in the LocationSort table added to each of the days rather than only the locations that were visited on that particular day.

      I'm still exploring other options as I learn more about Power BI and hopefully will be able to resolve it at some point.

      Any other suggestions will be very gratefully recieved.

      Thanks.