Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

problem with expression depending of the value of the dimension

Hi all & merry X'mas

I have a syntax problem in my attached application.

I have a file with 6 stores (A, B, C, ..., F) where I know the opening & closing hours for a period (summer, winter for example).

The problem is with the chart table called PROBLEM

I tried to build a Straight table with one dimension ( Dimwhen2 = 1 to 24 this is the hours)

where my expression is the count of stores open at each hours :

= sum ( aggr( Max( if( When2 >= Open_Hour and When2 < Close_Hour ,1 , 0) ) , IdStore) )

In my example, at 8 , i have 3 stores open, at 9 i have 4 stores ...

The field When2 is equal to Dimwhen2.

The calculation is good but only one value of the dimension appears in the table chart. I don't understand why.

Maybe someone have an idea.

Best wishes

Jean-Jacques

1 Solution

Accepted Solutions
Not applicable
Author

Add dimWhen2 to the aggr function ... see attached file

View solution in original post

2 Replies
Not applicable
Author

Add dimWhen2 to the aggr function ... see attached file

Not applicable
Author

Super ! it was so simple !

thanks Icg

JJ