Forum Discussion
Stacked bar chart formatting
- 6 years ago
Hi Anonymous ,
Try this:
Steps:
1. Add a calculated column.
Legend = [Category] & [Index]2. Create a table to sort Category in reverse order. Or just use "enter data" to set custom order.
Category = VAR t = DISTINCT ( 'Table'[Category] ) RETURN ADDCOLUMNS ( t, "Order", RANKX ( t, [Category],, DESC, DENSE ) )3. Create a measure.
1 = 14. Create visuals.
- Create a Ribbion visual and change the data color manually, then turn off background.
- Create a Treemap visual.
- Create a text box and enter text "Legend".
- Group.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Try to use Ribbon Chart inteading of Stacked Column Chart.
Reference: Ribbon Chart is the Next Generation of Stacked Column Chart
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Icey , thanks for your answer,
would be a way to order this by index but only showing unique legend? my problem right now is when aggregating values as i do not need to aggregate nothing but showing the results in cronological order.
Thanks for any guide.
- Icey6 years ago
Community Support
Hi Anonymous ,
Try this:
Steps:
1. Add a calculated column.
Legend = [Category] & [Index]2. Create a table to sort Category in reverse order. Or just use "enter data" to set custom order.
Category = VAR t = DISTINCT ( 'Table'[Category] ) RETURN ADDCOLUMNS ( t, "Order", RANKX ( t, [Category],, DESC, DENSE ) )3. Create a measure.
1 = 14. Create visuals.
- Create a Ribbion visual and change the data color manually, then turn off background.
- Create a Treemap visual.
- Create a text box and enter text "Legend".
- Group.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.