Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
wale_martins
Contributor III
Contributor III

Missing dimension values

Hi there,

I’ve already created a calculated dimension to show months between  a determined period and a expression to count visits in each month.

Calculated dimension:

=aggr(only({<MONTHYEAR={">=$(=monthstart(today(),-vRollingMonth))<=$(=monthend(today()))"}>}

MONTHYEAR),MONTHYEAR)

Expression

=count(dictinct VISIT_ID)

Both dimension and expression are working, but my problem is that the month is only shown when there's a VISIT_ID and I would like to show the months with no visits also.  I've already unchecked "supress zero-values"  but the problem continues.

Any help would be appreciated.

Wale

Labels (2)
1 Solution

Accepted Solutions
wale_martins
Contributor III
Contributor III
Author

Hi there,

I've finally solved my problem…

Dimension: I've avoided all the possible selections except the DATE one.

=aggr(only({<
COD_NAME=,NAME=,TYPE=,GROUP=,TAG=,
DATE={">=$(=monthstart(today(),-vRollingMonth))<=$(=monthend(today()))"}>}
MONTHYEAR),MONTHYEAR)

Expression 1: I've created an expression to count all visits between the selected period.

=Count({<
DATE={">=$(=monthstart(today(),-vRollingMonth))<=$(=monthend(today()))"}>}
DISTINCT ID_VISIT)

Expression 2: I've created an expression to count all the monthyear values between the selected period. (This expression Will be hidden)

=Count({1}DISTINCT MONTHYEAR)

 

RESULT:

1.png2.png

 

If there's a better way to solve the problem, please let me know it.

Best Regards

Wale

 

View solution in original post

4 Replies
sergio0592
Specialist III
Specialist III

Hi,

Have you checked "Show all values" in the dimension tab?

p1.jpg

 

Anil_Babu_Samineni

Try this as filter and see what is the outcome?

=aggr(only({<MONTHYEAR={">=$(=monthstart(today(),-vRollingMonth))<=$(=monthend(today()))"}>}

MONTHYEAR),MONTHYEAR)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
wale_martins
Contributor III
Contributor III
Author

Hi Sergio,

When you add a calculated dimensión, it's not possible to check "Show all values" option.

1.png

 

 

wale_martins
Contributor III
Contributor III
Author

Hi there,

I've finally solved my problem…

Dimension: I've avoided all the possible selections except the DATE one.

=aggr(only({<
COD_NAME=,NAME=,TYPE=,GROUP=,TAG=,
DATE={">=$(=monthstart(today(),-vRollingMonth))<=$(=monthend(today()))"}>}
MONTHYEAR),MONTHYEAR)

Expression 1: I've created an expression to count all visits between the selected period.

=Count({<
DATE={">=$(=monthstart(today(),-vRollingMonth))<=$(=monthend(today()))"}>}
DISTINCT ID_VISIT)

Expression 2: I've created an expression to count all the monthyear values between the selected period. (This expression Will be hidden)

=Count({1}DISTINCT MONTHYEAR)

 

RESULT:

1.png2.png

 

If there's a better way to solve the problem, please let me know it.

Best Regards

Wale