Forum Discussion
Custom Sorting in PowerBI?
- 9 years ago
You can create a table like following one and create relationship with the original table.
Then create a calculated column in original table with following formula.
Column = RELATED( Table2[ID] )
At last, select the Type column and make it sorted by above created column.
Best Regards,
Herbert
You can create a table like following one and create relationship with the original table.
Then create a calculated column in original table with following formula.
Column = RELATED( Table2[ID] )
At last, select the Type column and make it sorted by above created column.
Best Regards,
Herbert
- forzajoensy9 years agoFrequent Visitor
Great tips! Thanks! Its a long way around from what should be a custom sort or drag feature link in a pivot table. Will be available some time I guess.
- iGi9 years agoAdvocate I
Since I'm unfamiliar with this, I'm getting stuck at adding a new column and referencing the ID column from the newly created table.
Here is where I am:
1. Added a new table with Risk and ID columns:
2. Created a link between the two tables on Risk Rating and Risk:
3. Clicked on Custom Column and the only columns available to me are those in the original, primary table and I don't know how to reference the new "Risk Order" table in the formula:
Any advice?
- iGi9 years agoAdvocate I
v-haibl-msft Wow! Didn't even think of doing that. Thank you! I'll give this a try to see if it will work with the larger table that I'm using here.
On a separate note, how did you learn this? It resembles SQL to me.
- iGi9 years agoAdvocate I
v-haibl-msft I got it! I was editing the query earlier, not realizing that I should just go through the Modeling tab under the table.
Anyway, I was able to select "ID" from the new table:
Sorted the Risk Rating column as you said, saved and the change took.
Learned something new today. :)
Thank you!
- Anonymous8 years agoNot applicable
Awesome tip!
I was struggling to reorder certain data, but this worked like a charm!
Thanks a lot!!
- mvanwyns8 years agoAdvocate I
All these workarounds for just a simple sort task, unbeleivable how difficult it is
I just can't get this crap worked out
- Anonymous7 years agoNot applicable
Agreed! This is such a basic feature, why it requires such a workaround seems absurd!
- Anonymous5 years agoNot applicable
This is perfectly worked. thanks you.
- Cortana3 years agoHelper IV
Hello v-haibl-msft
I have tried that, but the problem I am facing is that I have a category that has no value in our original table. It is not appearing in my graph but I want to show it in my chart. What to do?
- 22LACMT3 years agoHelper III
I have 5 columns that need to be reordered in different ways in my fact table. I created 5 seperate demention tables with the column and a new column that attched a resort to them. then I sorted on the that new column. worked great and the data reorganized at the data level in the demention table. however, when I use that resorted field from the demention table the data does not reorganize.... please please help im so stuck.
I can not reorder my main table as there are 5 different fields that need to be reordered for different visuals.
- fhabbiyy3 years agoRegular Visitor
Is there a way to do this if I'm pulling from a live dataset? I can't add columns or adjust the data. For example see my attachment.
- HKInd3 years agoHelper I
I have similare question but with year and type column:-
for Year 2015 i want to see type order(Critical, High,Medium, Low) but for 2016 i want to see type order(High,Critical,Medium, Low) not in graph maybe in slicer/metric visual - IS IT POSSIBLE? I have tried above solution but doesn't work with two column, tried related formula, sort by column nothing works. works fine for 2015 not for 2016. Please help..