Forum Discussion

Egrofal's avatar
Egrofal
Helper I
9 years ago
Solved

Sort table by date

Hi,

 

I am using Power Bi for my company, and have to create dashbord with several table sorted by date,

I got a date picker table and some other tables. And on these tables I would like to sort all my datas by date (ascending). For that I added a column date and sort the table by this column. But the problem is that I have ta add the date on all my tables, and it's not really usefull and would like to delete this column (but if I do that my table are not sort by date anymore). 

 

So my question is : Is-it possible to sort my table day the ascending date, even if I don't add this column in my tables ? 

 

Thanks for your help,

Valentin

  • Egrofal's avatar
    Egrofal
    9 years ago

    So to help people who got the same problem, the best way to resolve it at the moment is to place the column on the right of the board, go to the focus mode and hide it on the left

    On this way my table's tab looks like that :

     

    So Date is hiden, (you just see a small part of the tab)

     

    It's not perfect, but I don't have any idea to do better...

22 Replies

  • Hi,

     

    I am using Power Bi for my company, and have to create dashbord with several table sorted by date,

    I got a date picker table and some other tables. And on these tables I would like to sort all my datas by date (ascending). For that I added a column date and sort the table by this column. But the problem is that I have ta add the date on all my tables, and it's not really usefull and would like to delete this column (but if I do that my table are not sort by date anymore). 

     

    So my question is : Is-it possible to sort my table day the ascending date, even if I don't add this column in my tables ? 

     

    Thanks for your help,

    Valentin

    • Greg_Deckler's avatar
      Greg_Deckler
      Community Champion

      So, in theory you might be able to pull it off by setting the "Sort By Column" for one of your other columns to your Date field. Sort By is in the Modeling section of the ribbon.

  • Yes but you can only sort the individual visual and not the entire dataset. 

     

    To do so, follow this steps,

     

    1. Select the ellipses (...) in your visual and choose Sort by > Dates.

    2. If necessary, select the sort icon  to change to Descending or Reverse for Ascending.

     

    Thanks & Regards,

    Bhavesh

    • Egrofal's avatar
      Egrofal
      Helper I

      Thanks for your answer, 

      Ok but when I select the ellipses in my visual, I don't have the possibility to choose Sort By > Dates.

       

      Like you can see on one of my table, when I am selecting the elipse, I can only choose : Export Data or Remove.

       

      So I can't do your solution, 

      To remind I want to have the table, sorted like on the screen shot but i don't want to keep the column "Day". But if I delete it, it's gonna be sorted by the second column "CPC"

  •  

    As you have shown in the screenshot, you can not sort this table by dates without adding the date column in your table or in other words, you have to have a date column in your table to sort your data by dates.

     

    Hope this has clarified your understanding.

     

     

     

    • Greg_Deckler's avatar
      Greg_Deckler
      Community Champion

      You might be able to go into your data model and choose the Modeling tab and then set the "Sort By Column" for one of your other columns to be the Date column.

      • Egrofal's avatar
        Egrofal
        Helper I

        Thanks for your help, but I am not able to do this, like you can see on the following screenshot 

         

    • v-haibl-msft's avatar
      v-haibl-msft
      Microsoft Employee

      Egrofal

       

      If you want the cost column to be sorted by day column, you need to first select the cost column and then click “Sort By Column” - “date_days” as below.

       

       

      Best Regards,

      Herbert

      • Egrofal's avatar
        Egrofal
        Helper I

        Hi Herbert,

         

        Thanks for your answer,

        I tried but when I select the column "cost" then sort it by "date" I have a error message :

         

        "We cannot sort the 'cost' column by 'date_day'. You can't have more than one value in 'date_day' for the same value in 'cost'. Choose a different column for sorting or update the data in 'date_day'.