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: 
Anonymous
Not applicable

Expression Issue

Below expression works fine if I add this in Expression tab but the same expression gives Error in Calculation error if I add this in dimension

=If (
If(IsNull([Revised Target Completion Date (Issue)]),[Target Completion Date (Issue)], [Revised Target Completion Date (Issue)]) > date(floor((addmonths(vMonthEnd,0))), 'YYYYMMDD')
And If(IsNull([Revised Target Completion Date (Issue)]),[Target Completion Date (Issue)], [Revised Target Completion Date (Issue)]) < date(floor(monthstart(addmonths(vMonthEnd,13))), 'YYYYMMDD')

//If(IsNull(CurrentTargetDate),OriginalTargetDate, CurrentTargetDate) >= date('01/01/2016', 'YYYYMMDD')
,
(
date(floor(monthstart(If (IsNull([Revised Target Completion Date (Issue)]),[Target Completion Date (Issue)], [Revised Target Completion Date (Issue)]))), 'MMM-YY'))
)

2 Replies
Anil_Babu_Samineni

Will you able to provide sample. I assume you required Aggr() over Calc. Dimension

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
sunny_talwar

What dimension or dimensions do you use when this is used as an expression? Let's say the dimension is called Dim1, then try this

Aggr(

If (
If(IsNull([Revised Target Completion Date (Issue)]),[Target Completion Date (Issue)], [Revised Target Completion Date (Issue)]) >date(floor((addmonths(vMonthEnd,0))), 'YYYYMMDD')
And If(IsNull([Revised Target Completion Date (Issue)]),[Target Completion Date (Issue)], [Revised Target Completion Date (Issue)]) <date(floor(monthstart(addmonths(vMonthEnd,13))), 'YYYYMMDD')

//If(IsNull(CurrentTargetDate),OriginalTargetDate, CurrentTargetDate) >= date('01/01/2016', 'YYYYMMDD')
,
(
date(floor(monthstart(If (IsNull([Revised Target Completion Date (Issue)]),[Target Completion Date (Issue)], [Revised Target Completion Date (Issue)]))), 'MMM-YY'))
),


Dim1)