Using a parameter to select which dimensions are included in a table

I want to create a table that lets the user select which dimensions are being displayed as the first and second columns. The other options wouldn’t be included in the table, so I can’t just allow the user to rearrange existing column headers.

Here are the dimensions I’m using:

image

The primary and secondary segment have the same selection, and a user could pick the same dimensions from both if he/she only wanted the data to be binned by a single dimension.

Here’s the formula I put together to allow the user to select the primary segment. "$primary segment variable$ would be a parameter that the user could set.

if ($primary segment variable$==“Employer”)
return $employerName$;
else if($primary segment variable$==“Program”)
return $program$;
else if ($primary segment variable$==“Project”)
return $project$;
else if ($primary segment variable$==“Supervisor”)
return $supervisor$;
else if ($primary segment variable$==“Associate”)
return ($Associate + Username$

I think what I’m missing is the knowledge of how to enable the user to set $primary segment variable$.

Not sure that would work, as formulas need to return a measure, i.e. a number not a string.

I think that what you are looking for is dynamic hierarchies with the dynamic element filter control.

2 Likes

That was just the thing! And now I’ve got a new tool in my tool box. :slight_smile:

1 Like