Him
Him

Reputation: 5551

tableau change dimension to attr(dimension) in dashboard

In a worksheet, if I have a dimension as second dimension in a row label I can "collapse" that dimension with ATTR() by selecting Attribute in the menu:

enter image description here

However, this menu is only available on the worksheet view. How do I enable the user to accomplish this switch on the dashboard?

Upvotes: 1

Views: 432

Answers (1)

Alex Blakemore
Alex Blakemore

Reputation: 11896

Create a boolean valued parameter, call it say Should Expand. You can choose readable aliases, such as "Expand" for True and "Collapse" for False.

Show your parameter control and customize the look as desired

Create a calculated, call it, say Collapsable Foo, where Foo should really be the name of your true second dimension. Define it as

if [Should Expand] then [Foo] end

Make sure Collasable Foo is a dimension and use it as desired, presumably in place of Foo. You can edit the aliases for Collapsable Foo to set Null to a single blank to improve the way text appears when collapsed.

Upvotes: 1

Related Questions