Skip to Content
author's profile photo Former Member
Former Member

How can I add total category in a dimension?

I am trying to create a dimension that will show:

If Peter, then Area 1

If John, then Area 2

If both Peter and John, then Country 1

I wrote the following variable using IF & Else IF.

But it is not working.

=If([Salesmen Name]="Peter") Then ("Area 1")

Else If([Salesmen Name]="John") Then ("Area 2")

Else If([Salesman Name] InList ("Peter";"John")) Then ("Country 1")

End results will look like this:

Area Sales Area 1 100 Area 2 200 Country 1 300

Could you please advice me how I can achieve this....?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jun 29, 2016 at 06:45 AM

    Hello Hayden,

    Does the dataset always contains both Peter and John?

    Does it contains more names? If yes, what do you want to do with additional names?

    Your if expression cannot work because it will always be true fro John or Peter and not for the 3rd expression.

    To provide you an correct answer can you send a screenshot of your dataset to better understand what you want to display.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.