Forum Discussion
Noiala_94
1 year agoNew Member
Ordering with two measures
I need to sort a pie chart in Power BI so that international projects appear first, followed by national ones. Within each of these locations, I need the projects to be displayed in descending order of billing value.
Hi Noiala_94 ,
Add a new calculated column to your dataset that will define the sorting order. This column will be used to sort both the international/national grouping and the billing values.SortOrder = SWITCH(TRUE(), 'Projects'[Location] = "International", 0, -- International projects come first 'Projects'[Location] = "National", 1, -- National projects come second 2 -- Default for any other location type )In the column tools, set the Location column to sort by SortOrder column
1 Reply
- Bibiano_GeraldoSuper User
Hi Noiala_94 ,
Add a new calculated column to your dataset that will define the sorting order. This column will be used to sort both the international/national grouping and the billing values.SortOrder = SWITCH(TRUE(), 'Projects'[Location] = "International", 0, -- International projects come first 'Projects'[Location] = "National", 1, -- National projects come second 2 -- Default for any other location type )In the column tools, set the Location column to sort by SortOrder column