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

Context Operator "In"...where can I learn the syntax?

Employee Year Month Count Vacation A 2015 August A 2016

August

B 2015 August B 2016 August

Thank you always in advance for your warm guidance and generous help...

My variable Count Vacation contains formula:

=Count([Vacation]) In ([Employee];[Year];[Month])

1.What does semicolon mean? Does order of dimensions matter?

2.How is it different from:

=Count([Vacation]) In ([Employee]) In ([Year]) In ([Month])


3. Is there any page where it explains IN context operators...?


Thank you...

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2016 at 06:57 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2016 at 07:00 AM

    Hello Hayden,

    The semicolon is used to include multiple dimensions to be used with In operator

    If you use the second part of the code the measure value bifurcation will be different than your first part

    All you need to Know about IN, ForEach & ForAll Context Operators

    Above document will help you learn the syntax

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 14, 2016 at 07:59 PM

    For me these two are different formulas..Tested with your data and got the different result.

    I would suggest check your detail data and compare what you are getting same or not.


    Untitled.png (34.4 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2016 at 09:57 AM

    Dear All,

    1. Thank you for the pages.

    I was able to confirm that my first variable formula is correct...

    2. What I am still struggling is default output context...

    Would you recommend it putting it like this?

    =Count([Vacation]) In ([Employee];[Year];[Month]) In ([Employee]

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Default context is something which gets applied automatically to a measure value based on dimensions included in the block you don't have to worry about that.

      I don't recommend you to use the second formula

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.