Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rpinxt
Impactful Individual
Impactful Individual

Sort stacked graph based on quantity but keep the sort on the x-axis

So I have this stacked column chart:

rpinxt_0-1711712279876.png

Think the main issue here is that I have 2 fields on the x-axis.

So I have period and in this period type of volume (quantity in this case). Actual and LBE1.

In the legend I have the countries.

The chart is now sorted by country. But what we would like for this purpose is put the biggest chuck of every column at the bottom.

 

For Jan24 this would meen start with China for both Actual and LBE1.

But 2nd biggest for Actual would be India, however for LBE1 india is big with 50K but there is one bigger with 84K (russia) so that would come 2nd in LBE1.

 

Can this be done? Can we "rank" the volume by country in Type and Period but ofcourse keep the X-axis formatting.

Meaning Period Jan first and Actual comes before LBE1.

 

This chart is based on a sample test data which I will paste below so people can put that in Excel and use it to play around in PBI.

 

PeriodTypeVolumeCountry
Jan-24Actual484Australia
Jan-24Actual3863Brazil
Jan-24Actual8Chile
Jan-24Actual85069China
Jan-24Actual2350Colombia
Jan-24Actual100Costa Rica
Jan-24Actual5Croatia
Jan-24Actual6012Czech Republic
Jan-24Actual40Ecuador
Jan-24Actual1840Egypt
Jan-24Actual1615Hong Kong
Jan-24Actual1828Hungary
Jan-24Actual49292India
Jan-24Actual1031Indonesia
Jan-24Actual2660Malaysia
Jan-24Actual979Mexico
Jan-24Actual9012Other
Jan-24Actual11060Pakistan
Jan-24Actual100Paraguay
Jan-24Actual71Peru
Jan-24Actual528Philippines
Jan-24Actual3185Romania
Jan-24Actual27825Russian Fed.
Jan-24Actual1890Serbia
Jan-24Actual1006Singapore
Jan-24Actual6South Africa
Jan-24Actual15707South Korea
Jan-24Actual5119Taiwan
Jan-24Actual4498Thailand
Jan-24Actual12946Turkey
Jan-24Actual1398Ukraine
Jan-24Actual3Utd.Arab Emir.
Jan-24Actual2310Vietnam
Jan-24LBE152942 
Jan-24LBE19246Brazil
Jan-24LBE185815China
Jan-24LBE11745Colombia
Jan-24LBE1853Hong Kong
Jan-24LBE150459India
Jan-24LBE13023Indonesia
Jan-24LBE11364Malaysia
Jan-24LBE11162Mexico
Jan-24LBE189Oceana
Jan-24LBE1397Philippines
Jan-24LBE184106Russian Fed.
Jan-24LBE1374Singapore
Jan-24LBE19977South Korea
Jan-24LBE12790Taiwan
Jan-24LBE13513Thailand
Jan-24LBE124794Turkey
Feb-24Actual327Argentina
Feb-24Actual11Australia
Feb-24Actual6941Brazil
Feb-24Actual31Chile
Feb-24Actual86572China
Feb-24Actual1931Colombia
Feb-24Actual82Costa Rica
Feb-24Actual45Croatia
Feb-24Actual4270Czech Republic
Feb-24Actual12Egypt
Feb-24Actual1292Hong Kong
Feb-24Actual1606Hungary
Feb-24Actual50481India
Feb-24Actual4043Indonesia
Feb-24Actual70Israel
Feb-24Actual1282Malaysia
Feb-24Actual796Mexico
Feb-24Actual14523Other
Feb-24Actual7100Pakistan
Feb-24Actual49Paraguay
Feb-24Actual38Peru
Feb-24Actual1023Philippines
Feb-24Actual4219Romania
Feb-24Actual36516Russian Fed.
Feb-24Actual2528Serbia
Feb-24Actual588Singapore
Feb-24Actual1421South Africa
Feb-24Actual15409South Korea
Feb-24Actual3207Taiwan
Feb-24Actual5346Thailand
Feb-24Actual8136Turkey
Feb-24Actual8534Ukraine
Feb-24Actual1147Uruguay
Feb-24Actual46Venezuela
Feb-24Actual2135Vietnam
Feb-24LBE145926 
Feb-24LBE111532Brazil
Feb-24LBE179834China
Feb-24LBE11986Colombia
Feb-24LBE11224Hong Kong
Feb-24LBE150488India
Feb-24LBE13556Indonesia
Feb-24LBE11136Malaysia
Feb-24LBE11852Mexico
Feb-24LBE195Oceana
Feb-24LBE1392Philippines
Feb-24LBE134821Russian Fed.
Feb-24LBE1508Singapore
Feb-24LBE19708South Korea
Feb-24LBE14572Taiwan
Feb-24LBE14297Thailand
Feb-24LBE130000Turkey
Mar-24Actual350Algeria
Mar-24Actual552Argentina
Mar-24Actual1107Australia
Mar-24Actual8304Brazil
Mar-24Actual23Chile
Mar-24Actual65850China
Mar-24Actual1849Colombia
Mar-24Actual68Costa Rica
Mar-24Actual3099Czech Republic
Mar-24Actual108Ecuador
Mar-24Actual3080Egypt
Mar-24Actual1309Hong Kong
Mar-24Actual2472Hungary
Mar-24Actual67397India
Mar-24Actual4722Indonesia
Mar-24Actual2095Malaysia
Mar-24Actual313Mexico
Mar-24Actual12656Other
Mar-24Actual24722Pakistan
Mar-24Actual102Peru
Mar-24Actual296Philippines
Mar-24Actual2102Romania
Mar-24Actual37000Russian Fed.
Mar-24Actual543Singapore
Mar-24Actual422South Africa
Mar-24Actual1983South Korea
Mar-24Actual2985Taiwan
Mar-24Actual4595Thailand
Mar-24Actual10943Turkey
Mar-24Actual364Ukraine
Mar-24Actual706Uruguay
Mar-24Actual35Utd.Arab Emir.
Mar-24Actual2431Vietnam
Mar-24LBE152824 
Mar-24LBE15928Brazil
Mar-24LBE171103China
Mar-24LBE12020Colombia
Mar-24LBE1847Hong Kong
Mar-24LBE195981India
Mar-24LBE12657Indonesia
Mar-24LBE11860Malaysia
Mar-24LBE1856Mexico
Mar-24LBE1121Oceana
Mar-24LBE1403Philippines
Mar-24LBE131413Russian Fed.
Mar-24LBE1461Singapore
Mar-24LBE12088South Korea
Mar-24LBE12752Taiwan
Mar-24LBE14148Thailand
Mar-24LBE131138Turkey
1 ACCEPTED SOLUTION

5 REPLIES 5
lbendlin
Super User
Super User

Consider using a ribbon chart (if needed without ribbons)

rpinxt
Impactful Individual
Impactful Individual

@lbendlin well I changed the stacked column chart in a ribbon chart but really fail to see how that would help.

I can still not sort all on quantity inside periode and inside type...

lbendlin_0-1712155514266.png

 

rpinxt
Impactful Individual
Impactful Individual

Ah...great! @lbendlin guess I needed to see it but indeed this is what we were looking for.

 

rpinxt
Impactful Individual
Impactful Individual

Was thinking about something with a RANK or RANKX ?

But I would not know how to start.

Like rank volume in period and in field type.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.