Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tenyeapen
Contributor
Contributor

Error in calculated dimension

in a straight chart, in dimension I'm giving th ebelow expression in calculated dimension area and its giving the error Error in calculated Dimension.

 

if(Round(Today()-[Submitted To MCO Date])>3, count(INVOICE#),0)

 

please help me.

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

I suspect that the problem is with the naked* field [Submitted To MCO Date] -- if there is more than one possible value in this context, then this will evaluate to null and the calculated dimension will fail. You may need to place this expression in an Aggr() function using suitable dimensions to ensure that there is only one possible value or use additional dimensions in your chart or table.

You can verify this by disabling the calculated dimension and temporarily adding the using the expression =[Submitted To MCO Date].

* a naked field is a field not enclosed with some sort of aggregation (like Sum(), Max(), etc

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

View solution in original post

5 Replies
Surya
Creator II
Creator II

Hello., Try this if(Num(Today()) - Num([Submitted To MCO Date]) > 3, count([INVOICE#]),0)., In case of not working in Calculated Dimension Try the same in Expression and Drag where ever you want., I think Its Working
tenyeapen
Contributor
Contributor
Author

thanks for the quick responds, but still the same error.

Surya
Creator II
Creator II

Give me sample application

jonathandienst
Partner - Champion III
Partner - Champion III

I suspect that the problem is with the naked* field [Submitted To MCO Date] -- if there is more than one possible value in this context, then this will evaluate to null and the calculated dimension will fail. You may need to place this expression in an Aggr() function using suitable dimensions to ensure that there is only one possible value or use additional dimensions in your chart or table.

You can verify this by disabling the calculated dimension and temporarily adding the using the expression =[Submitted To MCO Date].

* a naked field is a field not enclosed with some sort of aggregation (like Sum(), Max(), etc

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

Given the last post, I just wanted to add a Design Blog post that may be of some help as well:

https://community.qlik.com/t5/Qlik-Design-Blog/Use-Aggregation-Functions/ba-p/1475833

If you are still working on things, please leave an update, if the last post got you what you needed, be sure to come back to the thread and use the Accept as Solution button to mark that as correct and to give credit for the help.  

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.