Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi there
I have the below table, made up of fields from 'RiskRegister.
I have a sort column for the ([Source Name] that orders the sources as RCI,Audit Issue,RCSA Action,RCI Action,Audit Action, and Op Event Action from top to bottom. I just need to somehow sort the values from the [Status] column to read from left to right: Past Due, Due in < 30 days, and Open, not alphabetically as default.
What do I do? I can't sort 2 different columns within the same dataset by 2 different columns. Using a combined sort order for both didn't work for me.
Below is the final table as displayed in my desktop. The source name is sorted but the statuses are not :
Source Name | Due in < 30 Days | Open | Past Due |
RCI | 1 | 3 | 1 |
Audit Issue | 1 | 2 | 1 |
RCI Action | 1 | 3 | 1 |
RCI Action | 1 | 5 | 1 |
Audit Action | 1 | 3 | 2 |
Op Event Action | 1 | 5 | 3 |
Hi @E_K_,
Thanks for reaching out to the Microsoft fabric community forum.
You qre right that Power BI visuals like the matrix don't let you directly sort two different columns by two different fields within the same table. However, as @FBergamaschi and others suggested the workaround to create sort helper tables and then link them to your fact table. Kindly go through their responses and check if your issue can be resolved.
I would also take a moment to thank @burakkaragoz, @danextian and @FBergamaschi`, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Hi @E_K_,
As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.
If yes, you are welcome to share your workaround so that other users can benefit as well. And if you're still looking for guidance, feel free to give us an update, we’re here for you.
Best Regards,
Hammad.
Hi @E_K_ ,
You've got a classic Power BI sorting challenge here. Both responses you received are correct, but let me give you the complete solution.
@FBergamaschi 's approach is the best practice method:
Step 1: Create a Status Sort Table Go to Home → Enter Data and create:
Status Sort Order Past Due 1 Due in < 30 days 2 Open 3
Step 2: Create Relationship
Step 3: Sort the Status Column
Step 4: For Source Name (if you need custom sorting) Create another table:
Source Name Sort Order RCI 1 Audit Issue 2 RCI Action 3 Audit Action 4 Op Event Action 5
Follow the same relationship and sorting steps.
Alternative: Query Editor Method If you prefer the conditional column approach:
Both methods work, but the separate table approach is cleaner for maintenance and reusability across multiple reports.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes.
Hi @E_K_
In the query editor create a conditional column that returns a sort values.
Use this to custom sort the Status column by
Do the same for Source Name if you want a different sort order.
Source Name and Status are two different columns, therefore you can sort them by the values of another column
For the Status if you do not have already a suitable table, you can create it (insert data in Power BI Desktop)
Status Order
Past Due 1
Due in < 30 days 2
Open 3
Connect this table 1 to many to the Fact table, bring the Order in the Fact table trhough a calculated column using the RELATED function and sort Status via the values of Order
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
User | Count |
---|---|
79 | |
74 | |
44 | |
32 | |
28 |
User | Count |
---|---|
104 | |
93 | |
52 | |
50 | |
46 |