Forum Discussion
Order Projects by date
I have one project where my database is an online Excel file, but the projects are sorted alphabetically rather than by date. I would like to sort them by ‘DATA FIM DE OBRA.’ Is this possible?
PBIX file: https://www.swisstransfer.com/d/2b6f891b-76ad-488d-b24f-716cdc6870c3
Thank you for your help.
Hi ctrlaldelight ,
Add the Data da Obra Column before the Projecto ojn the Category. If you want you can hide that column just resizing the column or do a hierachy layout
Please see file attach.
3 Replies
- danextianSuper User
Your pbix isn't accessible from my end.
That aside, you can use an External tool called Tabular Editor to sort the same distinct project value multiple times which the Power BI GUI doesn't allow. Bear in mind though that the projects will be displayed in separate rows according to their actual and sort by value
Notice in the image below, that the same projects are displayed multiple times and are sorted according to the Date column without this column being sorted.
Alternatively, you can precede the project name with an invisible character repeated multiple times depending on the date rank in desc order
Project2 = VAR dateRank = RANKX ( 'Table', 'Table'[Date],, DESC, DENSE ) RETURN REPT ( UNICHAR ( 8203 ), dateRank ) & 'Table'[Project] - MFelixSuper User
Hi ctrlaldelight ,
Add the Data da Obra Column before the Projecto ojn the Category. If you want you can hide that column just resizing the column or do a hierachy layout
Please see file attach.
- ctrlaldelightFrequent Visitor
I created a new table:
DimProjects =
FILTER(
SUMMARIZE(
“Projects”,
“Projects”[Project],
‘MaxEndDate’, MAX(“Projects”[End Date])
),
NOT ISBLANK(“Projects”[Project])
)And I created a relationship between this table and the other table in the Projects column Cardinality → One to Many (1:*)
Filter direction → Single I sorted the Projects column in the DimProjects table by FimObraMax and kept it sorted alphabetically