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

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

calculated dimensions

Hello,

I have the following question.
I want to make a table what shows how much records there made with a startdate between a specific date.

First i made a import field where i put my dates in.
For example:

Start 1-2-2010
End 28-2-2010

Then i made a a table with the following expression:

=Only({<Startdatum ={'>=$(Vanaf)<=$(Tot)'}>
}
if(Startdatum >= Vanaf, Startdatum, Startdatum))

Now it's shows the right dates with one exception:
When there's a record with the same value it wont show any of this record.

Since i know this happens with expression i tried the above code as calculated dimension:
But this doesnt work.

Does anyone know how the make a calculated dimension with the following values

If startdate >= start(import field) <= end(import field) show startdate

6 Replies
maneshkhottcpl
Partner - Creator III
Partner - Creator III

Hi,

Can u post ur applicatio with ur requirmrnt? I will help you to fix the issue.

gauravkhare
Creator II
Creator II

Hi Marie,

I got your question... You mean that you want to the show the count or sum or whatever of those records which fall inbetween the start date and the end date. In short you want to do bucketing! Ok then a simple way to achieve this is by taking the datedifference of the start _date and end_date------num(datedifference(start_date,end_date). Now our expression in the calculated dimension would be something like this-if(diffdate>10 and diffdate<20,'marie1', if(diffdate>20 and diffdate<30,'marie2'))......

I hope this will solve your problem!

Not applicable
Author

Manesh and Gaurav,

I have solved my problem a fixed it with the following code:

=

But now i got another problem.
I dont need any expressions in this table but when i empty all expressions the table doesnt show me any values.
How can i fix this? if a exxpression is needed i could use an expression like:

if(Startdatum >= Vanaf, if (Startdatum <= Tot , Startdatum))

Count( =if(Startdatum >= Vanaf, if (Startdatum <= Tot , Startdatum)) )

I also tried that expression but doesnt work.

gauravkhare
Creator II
Creator II

Dear Marie,

you can't disable the expressions as doing so won't show up table/chart. Or you can do one thing...on the expressions page just write =1.

Not applicable
Author

Also that problem is fixed i mad ethe following Exxpression:

=

if(Startdatum >= Vanaf, if (Startdatum <= Tot , Startdatum))

And hide this exxpression from my table.





gauravkhare
Creator II
Creator II

Dear Marie,

If for example you want to know the number of employees who have resigned with a specified bucket then you can write the above sripting in the calculated dimesion part while on the expression page you can use something like count(emp_id).. now the graph obtained will show up buckets and against it the count of employee.

Try the above out and it will work fine