Is it possible to return dimensions with different types under a single parameter?

Hi all, 

Now I have the data which is similar as follows:

week_from_launch     date                       sales 

52                                  2020-08-15           1000

104                               2021-08-15            900

…                                   …                              …

The week_from_launch is an integer and date is date.

What I want to achieve is to set a parameter, and use the dimension selected as the x-axis of the bar chart. So when I choose ‘week_from_launch’, the data will be shown with week_from_launch, and vice versa. 

However, since they are in different data types, I am struggling to find a way to visualise it. 

Does anyone have any good suggestions? Thanks!

0 1 160
1 REPLY 1

yadderace
Participant I

Hi, I made something similar to your problem.

I defined a parameter which allows me to switch between two dimensions.

8411f571-b42c-40fb-9661-ce43a5291525.png

Then, I defined a measure (in your case, it should be a dimension) which will store the value for this selected dimension.

1e1e4f8b-c661-453e-b6da-77169e571113.png

If you need to have them in string you could try cast the values.

Let me know how it’s going.

Top Labels in this Space
Top Solution Authors