8 Replies Latest reply on Apr 28, 2018 9:51 AM by Shinichiro Murakami

# Creating a parameter and a calculation

Hello,

I need you help community.

1. I need to create a new parameter 'WalkTitle cont' with Data Type: 'string', allowable values: all.

2. Then I need to create a new calculated dimension ' WalkTitle GrŠ¾up': if 'WalkTitle cont' is empty then show values from 'Title', if 'Title' contains value from the parameter 'WalkTitle cont', then split all titles into 2 groups: the first one named as value from the parameter 'WalkTitle cont' and the second one - 'Others'

And I have a problems with the second point. Do I need to set up all this conditions in one calculation? And how it should look like?

• ###### 1. Re: Creating a parameter and a calculation

Hi Amayak,

Could you please attach simple sample data (as twbx is the best always, but excel, csv also works)

Thanks,

Shin

• ###### 2. Re: Creating a parameter and a calculation

Of course. Please find the .csv file attached to the main message.

• ###### 3. Re: Creating a parameter and a calculation

Shin?

Can you help me?

• ###### 4. Re: Creating a parameter and a calculation

HI Amayak

Hope this helps.

Thanks,

Shin

• ###### 5. Re: Creating a parameter and a calculation

It has almost helped.

The last issue. I need to "split all titles into 2 groups: the first one named as value from the parameter 'WalkTitle cont'", so the first group should pull the name out of the "WalkTitle cont" field. In your formula: you wrote it manually.

So when so my calculation -

IF [WalkTitle cont] = ""

THEN [Title]

ELSEIF CONTAINS([Title],[WalkTitle cont])

THEN [WalkTitle cont]

ELSE "Others"

END

Not working. As instead of name that should be pulled from WalkTitle cont field - I get 0

• ###### 6. Re: Creating a parameter and a calculation

Not exactly sure, but you mean this?

Not from inbox but from original post.

Thanks,

Shin

• ###### 7. Re: Creating a parameter and a calculation

Thank you very much, Shin. You are awesome.

• ###### 8. Re: Creating a parameter and a calculation

You are welcome.

Shin