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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error in calculated dimension

Hi,

I have two tables one for sales and one for calls.

the key on both tables is the employee name.

I am trying to have a table chart that show Employee, Amount of Sales and Count(Number called).

I am getting an error in calculated dimension on Count(NumberCalled).

Any Idea on why I am getting the error.

thanks,

Labels (1)
1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

When date expressions like this dont work, its normally due to the date format being different. Set analysis is performed on the text value of the dates. Assuming that Datefield is in YYYYMMDD format, something like:

count({$< Datefield = {"$(=Date(today(), 'YYYYMMDD'))"}>} Numbercalled)

Adjust the format as appropriate.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

10 Replies
Not applicable
Author

When you open the expression, at the top left of the screen does is say "Expression ok" ?

Try checking your field names, they are case and space sensitive

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Could you describe your data model, or better yet, post an the app or a sample of the app?

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

I guess, I have fixed it, I just added the employee and the amount as dimensions and the count (Numbercalled) as expression.

it looks like it is working fine however I have a date field which has the day date how can i make it to choose today's date as default.

Thanks,

Not applicable
Author

try something like this:

count({$< Datefield = {"=$(=today())"}>} Numbercalled)

Not applicable
Author

this didn't work.

it shows 0 on the count..field

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

When date expressions like this dont work, its normally due to the date format being different. Set analysis is performed on the text value of the dates. Assuming that Datefield is in YYYYMMDD format, something like:

count({$< Datefield = {"$(=Date(today(), 'YYYYMMDD'))"}>} Numbercalled)

Adjust the format as appropriate.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi,

My date field named DateField and the value in it is only for day like DD

I tried count({$< Datefield = {"$(=Date(today(), 'DD'))"}>} Numbercalled)

but I am still getting Zeros

how ever i have another Field that I can use wich is showing me the date of today  like 40367

jonathandienst
Partner - Champion III
Partner - Champion III

So its a number. How about

count({< Datefield = {"$(#Day(today()))"} >} Numbercalled)

Check that the brackets are balanced

If that doesn't work, start from basics like

count({< Datefield = {1} >} Numbercalled)

count({< Datefield = {"$(#Day('2012/03/08'))"} >} Numbercalled)

etc

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

I have changed the format of the DateField to YYYMMDD and I am still getting Zeros.