Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
vdzvdf
I want to use loops in qliksense. Is it possible? If yes can please explain with an example.
Yes - loops in many ways can be used in Qlik Sense.
Could you be more specific? It will be very time consuming guessing and making explanations of many very different approaches for different purposes. Be specific about what you aim to achieve by using "loops" - there might be alternative and better approaches too.
Is it loops within a load script?
Is it loops in some way in the UI in a kind of expression?
Hi Petter,
I am not trying to look for a solution. I just want to learn how to use them in a variable at front end just for research purposes.
Thanks
Take a look here: Create ‒ Qlik Sense and explore the different functionalities for the expressions you can use in a chart.
It's in not very often that you need to do looping in the front-end in a variable... When creating BI-solutions in QlikView or Qlik Sense....
You can use the two functions called ValueList() and ValueLoop().
ValueLoop(1,5) will give you the numbers 1 to 5 iteratively.
For example if you have a calculated dimension based on ValueLoop(1,5) you can have an expression referring to that dimension so it will work:
In a straight table you can have:
1) Dimension: ValueLoop(1,5)
2) Expression: ValueLoop(1,5)*ValueLoop(1,5)
this will give a table of 5 rows with the expression column having the values 1,4,9,16,25.
"Looping" or iterations can also be achieved by using Concat() function. Concat will create a string consisting of all the values of a field. So it is iterating or looping over all the values of the fields and generating a result that can contain all these values.
Concat( Country , '/' ) will give you a slash separated list of country names.
Concat(DISTINC Country, ',', Country) will give you a comma separated list of distinct/unique country names ordered by Contry (alphabetically).
Can we use a variable in a loop. For example if I have a variable x as 1. I want it to have successive values upon an event like selection of date. Can we achieve that in Qlik?
Yes - what kind of table or visualization do you have in mind?
How would you like the values to be presented and how would the values be related to the event?