Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Apply Cycle on a column

Hi all,

I want to apply cycle function on Title column in table. Please find the sample data below

TitleCountyvalue
Lifetime Likes by AgeN/A112
Lifetime Likes by Cityatlanta114
Lifetime Likes by Citybangalore287
Lifetime Likes by Citychicago98
Lifetime Likes by Citydallas145
Lifetime Likes by Genderdoylestown227
Lifetime Likes by Genderherndon70
Lifetime Likes by Genderhyderabad106
Lifetime Likes by Genderjakarta157
Lifetime Likes by Genderlivingston109
Lifetime Likes by Genderlos angeles186
Lifetime Likes by Gender and Agemexico city71
Lifetime Likes by Gender and Agemumbai225
Lifetime Likes by AgeCA123
Lifetime Likes by LanguageEG52
Lifetime Total LikesES53
Lifetime Total LikesFR96
Lifetime Total LikesGB140
Lifetime Total LikesID173
Lifetime Total LikesIN866
Lifetime Likes by CountryIT78
Lifetime Likes by CountryJP50
Lifetime Likes by CountryKR87
Lifetime Likes by CountryMX110
Lifetime Likes by CountryMY69
Lifetime Likes by CountryPH77

I display it as attached file.

Is it possible in qlikview? (the data in in TITLE  is updated daily)

thanks

1 Solution

Accepted Solutions
MVP
MVP

Re: Apply Cycle on a column

Hi,

It is not possible to give dimension values as Cycle instead you can change your datamodel in such a way that each distinct individual value as separate dimension, but in reality it is a hectic task, you have change the script and charts everytime when New title is added into the dashboard.

Example:

LOAD

     Country,

     Value,

     If(Title = 'Lifetime Likes by Age', Title) AS [Lifetime Likes by Age],

     If(Title = 'Lifetime Likes by Age', Title) AS [Lifetime Likes by Age],   

     ,

     ,

     ,

FROM DataSource;

Instead of this what I would suggest is you can provide a filter in the Table Header by using

Chart Properties -> Presentation Tab -> Select Title column in Columns -> Select Dropdown Select option.  I think this is the better option.

Hope this helps you.

Regards,

jagan.

6 Replies
phaneendra_kunc
Valued Contributor III

Re: Apply Cycle on a column

is there any specific reason you what your data in Title column in cycle group?

what happens if user cycles and selects "Lifetime Likes by City" , will it filter the data for this?

May be you can use Multibox, or list box...

Not applicable

Re: Apply Cycle on a column

we are using multibox, but checking if it is possible to implement cycle and filter the data on selection?

phaneendra_kunc
Valued Contributor III

Re: Apply Cycle on a column

There is no straight way to implement this. you have to tweak the datamodel aswell as the UI expressions to work. and i dont recommend as it will be combersome to maintain.

MVP
MVP

Re: Apply Cycle on a column

Hi,

It is not possible to give dimension values as Cycle instead you can change your datamodel in such a way that each distinct individual value as separate dimension, but in reality it is a hectic task, you have change the script and charts everytime when New title is added into the dashboard.

Example:

LOAD

     Country,

     Value,

     If(Title = 'Lifetime Likes by Age', Title) AS [Lifetime Likes by Age],

     If(Title = 'Lifetime Likes by Age', Title) AS [Lifetime Likes by Age],   

     ,

     ,

     ,

FROM DataSource;

Instead of this what I would suggest is you can provide a filter in the Table Header by using

Chart Properties -> Presentation Tab -> Select Title column in Columns -> Select Dropdown Select option.  I think this is the better option.

Hope this helps you.

Regards,

jagan.

Not applicable

Re: Apply Cycle on a column

I thought of implementing the if condition, but the data varies everytime..so even I did not want to implement it

The  2nd option is closer to my requirement

Thanks a lot!

Not applicable

Re: Apply Cycle on a column

Thanks Phaneendra I was just checing out the options

thanks alot!

Community Browser