Cognos Analytics

 View Only

 Sort Multi-Measure Stacked Bar

Bob Smith's profile image
Bob Smith posted Wed March 25, 2026 07:22 AM

Hi, I have a CA dashboard with a stacked bar chart that has an agency name as the bar and 3 stacked length measures.  I would like to sort the agencies by the TOTAL of the 3 measures.  I can add a total item as a length measure and then sort but I don't want the total shown on the visual. I don't see a way to simply sort the agencies on a measure that is or is not in the display. Seems pretty basic so I think I am missing something. Thanks.

Paul Mendelson's profile image
Paul Mendelson IBM Champion

Create a calculation adding the three measures.

Add the new field to the length slot:

Apply sorting:

Now move the Measure Total calc to the Tooltip slot:

Note that I set the formatting on the calculation so it appears as currency.

Normally the tooltip slot doesn't allow sorting:

But the reason this works is the data item JSON isn't cleansed when moving from the Length to Tooltip slot. If you look at the underlying JSON (ctrl q /) you'll see this:

 

The definition for the item in the slot includes the sorting. If you're comfortable with the risk of breaking things, you can actually update the JSON directly with sorting and similar things on items that don't normally support it.