Multi Parameter Calculated Field

Hi,
I have been working with Quicksight for some time. I encounter a new issue.
While working with Single value parameters, the calculated field
ifelse(parameter1=‘A’ and parameter2=‘B’, columnname1,
parameter1=‘A’ and parameter2=‘C’, columnname2,
NULL)
works.
Now, i am working with multi value parameter and i want to define such calculated field.

the logic what i want to achieve is the following:
I have location and weatherparameters as two parameters, where location is multivalue parameter and weatherparameters is single value parameter.
I want to select two locations from location parameter and one weatherparameter and plot them into a graph.

Please help.

my dummy calculated field looks like this:
ifelse(
${Locations} = ‘IBMMohali’ AND ${Paramters} = ‘Humidity’, {ibmmohali_humidity},
${Locations} = ‘TDMohali’ AND ${Paramters} = ‘Humidity’, {tdmohali_humidity},
NULL)

there are 8 locations and 6 weatherparameters.
Please help me writing the query.

Thanks in advance.

Hi,

try to use the in-function.

ifelse(
in(‘IBMMohali’,${Locations}) AND ${Paramters} = ‘Humidity’, {ibmmohali_humidity},
in(‘TDMohali’,${Locations}) AND ${Paramters} = ‘Humidity’, {tdmohali_humidity},
NULL)

Thanks for the suggestion. I tried the same but the graph only plots the first defined value i.e in this case ibmmohali_humidity.

I want to plot two graphs but no result.

to clear things up,
I have:

  • 8 locations (e.g., TDMohali, IBMMohali, etc.)
  • 5 parameters (e.g., Humidity, Temperature, etc.)
  • A multi-select parameter ${Multilocations} for location selection
  • A single-select parameter ${Parameters} for selecting the weather parameter
  • Goal: Show 2 lines on a graph for the selected parameter, across multiple locations by selecting 2 locations at a time.

ah, yes. only the first correct statement is used.

So you have for every location and parameter a column with the values? so TDMohali_humidity, TDMohali_temperature, TDMohali_X, TDMohali_Y, etc?

Then you need multiple calculated fields.

To get two lines in one graph, you either need multiple values or a groubby (color) column
So if you would have an entry for each location for humidity, you could use the location column as a color field.

Do want to be able to choose all 8 locations to compare in the graph?

Yes Thomas.
I have almost 40 columns in my dataset, with datetime one of them.
The column names are datetime,TDLocation1_Weather1, TDLocation1_Weather2…TDLocation8_Weather5.
I created two parameters.

  1. Locations : Multi select parameter.
    Reason: I want to compare TDLocation1_Weather1 with TDLocation2_Weather1. At a time, I only want to compare two graphs i.e any weather paramter for two locations only.
  2. WParameter: Single value parameter.
    Reason: I want to analyse one weather parameter only for two locations selected from the locations parameter.

I am planning to create a visual where I will have these two parameters in the dashboard and a line graph, where when i select two locations and a weather parameter, a line graph with 2 lines will be displayed against the datetime on x-axis.

Hi @Ashish1605,

Hope everything is well with you! I just wanted to check back in as I saw this thread has been unanswered for a while. Were you able to come up with a solution to your problem or are there any persisting issues you are facing? If we do not hear back within 3 business days, I’ll close out this topic.

Hi @Ashish1605,

Since we have not heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you!