Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ashmitp869
Creator
Creator

Error in calculation while using the logic in dimension

Hi there ,

I am using the if logic in dimension field -

=if((Interval(today()-max(daystart(Session_Start)),'D'))> 90 ,Name)

but its giving me Error in calculated dimension.

Please assist.

My requirement is to show the report when (Interval(today()-max(daystart(Session_Start)),'D')) is greater than 90.

Thanks 

1 Solution

Accepted Solutions
Kushal_Chawda

@ashmitp869  You need to use aggr function while using any aggregation function in dimension. You can use this expression in measure instead. If you still want to use it in dimension then try below

=aggr(if((Interval(today()-max(daystart(Session_Start)),'D'))> 90 ,Name),Name)

or

aggr(if((Interval(today()-max(daystart(Session_Start)),'D'))> 90 ,Name),Name,Session_Start)

Note: If there are other dimensions in your table, you need to include that as well in aggr function. check suppress null value option for this calculated dimension

View solution in original post

1 Reply
Kushal_Chawda

@ashmitp869  You need to use aggr function while using any aggregation function in dimension. You can use this expression in measure instead. If you still want to use it in dimension then try below

=aggr(if((Interval(today()-max(daystart(Session_Start)),'D'))> 90 ,Name),Name)

or

aggr(if((Interval(today()-max(daystart(Session_Start)),'D'))> 90 ,Name),Name,Session_Start)

Note: If there are other dimensions in your table, you need to include that as well in aggr function. check suppress null value option for this calculated dimension

View solution in original post