Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

NEW webinar Dec. 7th: 2023 Outlook, A Pivotal Year for Data Integration SIGN ME UP!
Showing results for 
Search instead for 
Did you mean: 

Count and formula in the condition


I'm trying to do the following:

- I have a pivot table where the column is the months names and the rows are segments.

- as a measure, I need to use the number of users whose last order date was in the date range of each month (for each column).

I'm trying something like this

count({<last_order_date= {">=$(=date(monthstart([date])))<=$(=date(monthend([date])))"}>} distinct user_id)

in different variants (with and without (), with and without = before the formula). The formula window tells me 'OK', but the result is not displayed (displayed as null). 

I cannot use the field with the date of the last order directly in the dimension with the month name, because when i'll manage this, I need to add several more measures to the same pivot table that use other date dimensions.

What am I doing wrong?


Labels (1)
2 Replies
Creator II
Creator II

You could simply use =count( distinct user_id) right? it returns count for all months


No, I can't, because I need conditions. last order date is not the same as date, these dimensions have a different data array. in any case, I abandoned these calculations, since I never found a way to implement this in qlik sense. Thnak you anyway