Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for Data Integration and Data Analytics gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Change line style (e.g. from constant to dotted) using cyclic group

I would like to turn the line on my line chart into a dotted line from a constant one just for the most recent period. Right now my dimension is a cyclic group called MonthWeekDay which includes fields for Month, Week ending and Dates.  

So far I have added expressions into text objects to break a part my expression but I am having a hard time pulling it all together when creating the expression under 'Line Style.'

This is what I have broken it down to so far:

=if(max(Month), '<S3>' , '<S1>') 

=GetCurrentField(MonthWeekDay)

1 Solution

Accepted Solutions
Highlighted
Contributor
Contributor

Re: Change line style (e.g. from constant to dotted) using cyclic group

Hi Reuben,

Thank you for your help and sorry for the delay as I was on holiday! 

Your suggestion did work for the month dimension with GertCurrentField, however, for the weekend dimension I decided to use ReloadTime as that seemed like an easier option. I then used that for month as well. This is what I ended up with that worked: 

if(
(GetCurrentField(MonthWeekDay)= 'Week ending' and [Week ending] >= weekend(ReloadTime())-7)
OR
(GetCurrentField(MonthWeekDay)= 'Month' and monthstart(Month) = addmonths(monthstart(ReloadTime()),-1))
,'<S3>'
,'<S1>'
)

 

View solution in original post

3 Replies
Highlighted

Re: Change line style (e.g. from constant to dotted) using cyclic group

Hi, can you try with?:

=if(max(Month)=max(TOTAL Month)-1, '<S3>' , '<S1>') 

If there are different years in your chart maybe you need a period field that identifies both (year and month), to get only the last one.

Highlighted
Digital Support
Digital Support

Re: Change line style (e.g. from constant to dotted) using cyclic group

Zoha, did Ruben's suggestion work for you?  If so, do not forget to return to the thread and use the Accept as Solution button on his post to give him credit for the help and let others know it worked.  If you are still working on things, please leave an update.

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.
Highlighted
Contributor
Contributor

Re: Change line style (e.g. from constant to dotted) using cyclic group

Hi Reuben,

Thank you for your help and sorry for the delay as I was on holiday! 

Your suggestion did work for the month dimension with GertCurrentField, however, for the weekend dimension I decided to use ReloadTime as that seemed like an easier option. I then used that for month as well. This is what I ended up with that worked: 

if(
(GetCurrentField(MonthWeekDay)= 'Week ending' and [Week ending] >= weekend(ReloadTime())-7)
OR
(GetCurrentField(MonthWeekDay)= 'Month' and monthstart(Month) = addmonths(monthstart(ReloadTime()),-1))
,'<S3>'
,'<S1>'
)

 

View solution in original post