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.
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.
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 = 1
4. 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.