3 Replies Latest reply on Jan 9, 2019 12:26 PM by Joshua Preston

# Sort by % of total LOD with 2+ dimensions

I tried to replicate this solution Sort by % of total table calc that Paul Wachtler successfully solved.

This new scenario has three dimensions instead of two. I tried a number of sort options, but the logic is tricky since there are more dimension combinations/measures.

I'd ideally like to have the sort cascade like the screen shot showing Free, Partially Free, and Not Free (in that order) all on one sheet.

the following are partial solutions. Workbook attached (Dashboard 2). thx in advance.

• ###### 1. Re: Sort by % of total LOD with 2+ dimensions

Hey Josh

Is this what you want?

I did this by adding the Sort on PF to rows, adding a - in front of it and then making it Discrete. Also I moved it to front of Country and made it hidden.

If you want to reverse the sort just take away the -.

I hope this helps

Rodrigo

2 of 2 people found this helpful
• ###### 2. Re: Sort by % of total LOD with 2+ dimensions

I also did hide the Nulls...

Maybe you should add a IFNULL to your Sort calculation so they show as 0s instead of nulls... This will allow them to sort in the correct position if you want all countries there.

Rodrigo

• ###### 3. Re: Sort by % of total LOD with 2+ dimensions

This is close, but I was hoping to have continuous colors all the way down. After the 100% yellows, then you'd have the X% of yellows in descending order. Then you'd have the 100% grays, X% grays, 100% greens, X% greens. But then there are some bars with all three colors.  I'm realizing that sorting multiple dimensions within a percent of total table calc involves a lot of nested LODs. This will take more thought on my part. Thanks for the helpful resources.