Qlik Community

Qlik Sense Enterprise Documents & Videos

Documents & videos about Qlik Sense.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT

Cyclic Measures in Qliksense

pawwy1415
Contributor III

Cyclic Measures in Qliksense

I am going to Share My knowledge, How to create Cyclic Measure in Qliksense. We can Create Cyclic Measure in Qliksense Using QsVariable Extension.

Cyclic Measure by using QsVariable Extension:

To see the New Visitors by Date, Year, Quarter and Month using QsVariable extension need to follow the below steps.

Step 1:

Download and install the QsVariable extension from Qlik Branch.
Desktop Users Copy and Paste the Extension under below folders:

  1. C:\Users\bsbi\Documents\Qlik\Examples\Extensions
  2. C:\Users\bsbi\Documents\Qlik\Sense\Extensions\Templates

Server Users Go to QMC > Extensions > Import QsVariable Zip Folder.

Step 2:

Create a Variable named vMeasure in the variable editor and assign the default Measure i.e., 1 as first Measure in the button and click on save.

 

Step 3:

Drag and Drop QS Variable extension named Variable into sheet and select Created variable named vMeasure from the Drop down and select Show as Button, Style as Qlik.
 

Step 4:

Then go to values section assign each Measure Label by clicking on Add Alternative and assign the Values as 1, 2, and 3.

 

Step 5:

Now Drag and drop chart into Sheet. Under Dimension add Month Field and Under Measure add below Expression

if('$(vMeasure)'=1,num(Sum([New Visitors]),'#,##0'),
if('$(vMeasure)'=2,num(Sum([Unique Visitors]),'#,##0'),
if('$(vMeasure)'=3,num(Sum([Bounce Rate]),'#,##0.0%')
)))


To change Measure Label dynamically as per Button Selections use the below expression

if('$(vMeasure)'=1,'New Visitors',
if('$(vMeasure)'=2,'Unique Visitors',
if('$(vMeasure)'=3,'Bounce Rate'
)))


Use Number Formatting as Measure Expression

Step 6:
Now for Dynamic Titles go to General > Click on Title > enter this expression>
='Monthly Wise' &'-'&if('$(vMeasure)'=1,'New Visitors',
if('$(vMeasure)'=2,'Unique Visitors',
if('$(vMeasure)'=3,'Bounce Rate'
)))

Now by clicking on each Buttons the corresponding Measure related Trend will be visible in the Chart.

 

Comments
kuczynska
Contributor III

Thanks for sharing that! I was actually planning to investigate more on my own in relates to this - as we discovered it would be great if we would have cyclic groups in Sense. Will definitely test on my own Thank you!

0 Likes
Partner
Partner

Hello, I use this on my own too and it is good you share it! I would just recommend to use pick(match()) instead of multiple if() functions because of clarity of the expression if you want to have more measures.

You can use the same solution, for cyclic dimensions.

0 Likes
kkkumar82
Valued Contributor III

Agreed with Julian, I used this multiple times for cyclic dimensions, although 'Alternate dimensions' option is there in QlikSense it is fine for one dimension but if we have two dimensions and I need one as cyclic and other as regular then qsvariable extension is a perfect solution

0 Likes
pradnya_amol
Contributor

Hi,

Very useful doc but I would like to use the Variable to change the Cyclic dimension in the Table chart in Qlik Sense. Can anyone help?

0 Likes
MVP & Luminary
MVP & Luminary

Thanks for sharing this example.

If you would like to create a cycle without using an extension (if you are using Qlik Cloud, for example) you may want to take a look at this blog post:

https://www.quickintelligence.co.uk/qlik-sense-cycle-group/

This shows how you can create a data island to pick the cycle values.

Steve

0 Likes
Partner
Partner

Thank you very much!

I always used cyclics in QlikView and loved it. Now I can use them as cool buttons in Sense.

Gerard.

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2018-07-17 08:56 AM
Updated by: