Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Conditional dimension in Sense

Hi Everyone,

Im working on my Qlik Sense project and needed some guidance.

I have 4 Columns in my data:

S/NNumberStatusPeriod
a115Open41609
a116Lost41609
a215Won41334
a217Won41334
b115Open41395
b118Won41395
c115Open41275

Now I need to create a chart that will count the number of S/N in a month, but the condition being that every month(the month is in Period, which i will later convert using Date()) will have two entries, one for first half denoted by 15 in "Number" and one in second half denoted by any "Number" greater than 15(16, 17, 18). Now the count should be only for the latest period ie second half("Number" greater than 15), unless the date selected is less than 15(this again im implementing through a Master Calendar).

Im unable to form the right expression for it, having tried the condition in Conditional Dimension and Measure, any guidance will be greatly appreciated.

1 Solution

Accepted Solutions
Not applicable

Re: Conditional dimension in Sense

Its working for me. Just there is a slight modification in expression. Also please check the casing of each fields.

count(

   $(=

       if(

           day(date(Period)) < 15, '{< Number = {15} >}' , '{< Number -= {15} >}' ,

         )

     )

[S/N])

5 Replies
Not applicable

Re: Conditional dimension in Sense

Hi

I have not tried it. Can u try with this expression

=count(

   $(=

       if(

           day(date(period)) < 15, '{< Number = {15} >}' , '{< Number -= {15} >}' ,

         )

     )

S/N)

Not applicable

Re: Conditional dimension in Sense

Thanks for your response Ashish, but the chart isn't displaying anything after i implemented the expression, something i've faced with most of the expressions so far.

Not applicable

Re: Conditional dimension in Sense

Its working for me. Just there is a slight modification in expression. Also please check the casing of each fields.

count(

   $(=

       if(

           day(date(Period)) < 15, '{< Number = {15} >}' , '{< Number -= {15} >}' ,

         )

     )

[S/N])

Not applicable

Re: Conditional dimension in Sense

Great Ashish, it worked..... Just one question, does "-=" work as a logical NOT EQUAL in all cases....?

Not applicable

Re: Conditional dimension in Sense

yes -= works as not equal, it will consider all values of a set/field other than values you have given in modifier

Community Browser