Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Qlik Sense Line Chart without dimensions and without using ValueList

Hello everyone!

I have an issue with an expression because it can not be calculated for the Year-Month dimension but I want it in a line-chart. 

Example for Year-Month 2022-08:
(AM = Actual Month; PM = Previous Month)

Leavers AM (2022-08)
Employees PM (2022-07) + Recruitments AM (2022-08)

As we have the employees from last month it is not possible to add a dimension for Year-Month because the value would be shown in the last month.
So I made an expression for each month:



But when I want to convert it into a line-chart, I need a dimension in Qlik Sense.
(I remembered that in QlikView you could just show the values without a dimension in a line-chart...)

So I tried to use ValueList with a dynamic calculation of the newest months of the selection. This was way too slow (took like 4 Min. to calculate) but exactly how i wanted it:



Is it possible to ignore the need of a dimension in a line-chart in Qlik Sense or do you have another idea to show it?

Thanks for the help!

Labels (1)
3 Replies
Partner - Master
Partner - Master

HI @OlliTittes 

A line chart needs a dimension to plot against. Not a hundred percent on what you are trying to show, but i would be looking at a script flag that limits the months you want you and then use this in the set analysis for the that measure. 

Contributor II
Contributor II

@mark6505 thanks for your answer!

A flag would not help because i have data from different months which i want to show just a single month. 

Like in my example the expression should just be shown in the month 2022-08 but with data also from the previous month.

I fixed this problem by using a bar chart and a master-KPI for each month.

But i was wondering if there is a workaround for line charts without using the slow ValueList() function.

MVP & Luminary
MVP & Luminary

You could try to replace the valuelist() with a native dimension from an island-table. As far as the valuelist() parameter doesn't need to be dynamically it's usually the better solution and even then the island-table might be large enough to cover all needs. Whereby from a performance point of view I wouldn't expect a significantly difference - at least not by a single field but if it comes to several dimensions it may change completely.

Further it's quite important to use such synthetic dimensions only as a navigation or as a condition and not to connect them against the data-model in any way because it will create a cartesian data-set. Your mentioned calculation time of several minutes hints in this direction.

Beside this I'm not sure if you couldn't use the YearMonth as dimension. Thinkable are dynamically limitations to the available periods within the dimension and/or within the expressions and/or the use of interrecord-functions like above() to grab the values from neighbourhood.

In addition I would use the from @mark6505 mentioned flags. It shouldn't be too difficult to create an appropriate logic with the employees per period with 1 as counter and the beginning and the leaving is then flagged with 1. Afterwards a simple sum(counter) with or without the flags and with the needed periods in a set analysis would return the wanted basis-results and against each other the rates.

- Marcus